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

github.com/jgraph/drawio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/webapp/js/viewer.min.js')
-rw-r--r--src/main/webapp/js/viewer.min.js4044
1 files changed, 2023 insertions, 2021 deletions
diff --git a/src/main/webapp/js/viewer.min.js b/src/main/webapp/js/viewer.min.js
index 7b7656e5..6bedbecf 100644
--- a/src/main/webapp/js/viewer.min.js
+++ b/src/main/webapp/js/viewer.min.js
@@ -111,7 +111,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,ADD_ATTR:["target","content"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";
window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;
-window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.3.1",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.3.3",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&
0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!==
@@ -1952,10 +1952,10 @@ H);this.exportColor(G)};this.fromRGB=function(y,F,H,G){0>y&&(y=0);1<y&&(y=1);0>F
function(y,F){return(y=y.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i))?(6===y[1].length?this.fromRGB(parseInt(y[1].substr(0,2),16)/255,parseInt(y[1].substr(2,2),16)/255,parseInt(y[1].substr(4,2),16)/255,F):this.fromRGB(parseInt(y[1].charAt(0)+y[1].charAt(0),16)/255,parseInt(y[1].charAt(1)+y[1].charAt(1),16)/255,parseInt(y[1].charAt(2)+y[1].charAt(2),16)/255,F),!0):!1};this.toString=function(){return(256|Math.round(255*this.rgb[0])).toString(16).substr(1)+(256|Math.round(255*this.rgb[1])).toString(16).substr(1)+
(256|Math.round(255*this.rgb[2])).toString(16).substr(1)};var q=this,t="hvs"===this.pickerMode.toLowerCase()?1:0,u=mxJSColor.fetchElement(this.valueElement),x=mxJSColor.fetchElement(this.styleElement),A=!1,E=!1,C=1,D=2,B=4,v=8;u&&(b=function(){q.fromString(u.value,C);p()},mxJSColor.addEvent(u,"keyup",b),mxJSColor.addEvent(u,"input",b),mxJSColor.addEvent(u,"blur",l),u.setAttribute("autocomplete","off"));x&&(x.jscStyle={backgroundImage:x.style.backgroundImage,backgroundColor:x.style.backgroundColor,
color:x.style.color});switch(t){case 0:mxJSColor.requireImage("hs.png");break;case 1:mxJSColor.requireImage("hv.png")}this.importColor()}};mxJSColor.install();
-var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(b){return b.raw=b};$jscomp.createTemplateTagFirstArgWithRaw=function(b,e){b.raw=e;return b};$jscomp.arrayIteratorImpl=function(b){var e=0;return function(){return e<b.length?{done:!1,value:b[e++]}:{done:!0}}};$jscomp.arrayIterator=function(b){return{next:$jscomp.arrayIteratorImpl(b)}};$jscomp.makeIterator=function(b){var e="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];return e?e.call(b):$jscomp.arrayIterator(b)};
-Editor=function(b,e,k,m,C){mxEventSource.call(this);this.chromeless=null!=b?b:this.chromeless;this.initStencilRegistry();this.graph=m||this.createGraph(e,k);this.editable=null!=C?C:!b;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(p){this.status=p;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus=
-function(){return this.status};this.graphChangeListener=function(p,F){p=null!=F?F.getProperty("edit"):null;null!=p&&p.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};Editor.pageCounter=0;
-(function(){try{for(var b=window;null!=b.opener&&"undefined"!==typeof b.opener.Editor&&!isNaN(b.opener.Editor.pageCounter)&&b.opener!=b;)b=b.opener;null!=b&&(b.Editor.pageCounter++,Editor.pageCounter=b.Editor.pageCounter)}catch(e){}})();Editor.defaultHtmlFont='-apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", system-ui, ui-sans-serif, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"';Editor.useLocalStorage="undefined"!=typeof Storage&&mxClient.IS_IOS;
+var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(b){return b.raw=b};$jscomp.createTemplateTagFirstArgWithRaw=function(b,d){b.raw=d;return b};$jscomp.arrayIteratorImpl=function(b){var d=0;return function(){return d<b.length?{done:!1,value:b[d++]}:{done:!0}}};$jscomp.arrayIterator=function(b){return{next:$jscomp.arrayIteratorImpl(b)}};$jscomp.makeIterator=function(b){var d="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];return d?d.call(b):$jscomp.arrayIterator(b)};
+Editor=function(b,d,g,l,D){mxEventSource.call(this);this.chromeless=null!=b?b:this.chromeless;this.initStencilRegistry();this.graph=l||this.createGraph(d,g);this.editable=null!=D?D:!b;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(p){this.status=p;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus=
+function(){return this.status};this.graphChangeListener=function(p,E){p=null!=E?E.getProperty("edit"):null;null!=p&&p.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};Editor.pageCounter=0;
+(function(){try{for(var b=window;null!=b.opener&&"undefined"!==typeof b.opener.Editor&&!isNaN(b.opener.Editor.pageCounter)&&b.opener!=b;)b=b.opener;null!=b&&(b.Editor.pageCounter++,Editor.pageCounter=b.Editor.pageCounter)}catch(d){}})();Editor.defaultHtmlFont='-apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", system-ui, ui-sans-serif, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"';Editor.useLocalStorage="undefined"!=typeof Storage&&mxClient.IS_IOS;
Editor.rowMoveImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAEBAMAAACw6DhOAAAAGFBMVEUzMzP///9tbW1QUFCKiopBQUF8fHxfX1/IXlmXAAAAFElEQVQImWNgNVdzYBAUFBRggLMAEzYBy29kEPgAAAAASUVORK5CYII=";Editor.lightCheckmarkImage="data:image/gif;base64,R0lGODlhFQAVAMQfAGxsbHx8fIqKioaGhvb29nJycvr6+sDAwJqamltbW5OTk+np6YGBgeTk5Ly8vJiYmP39/fLy8qWlpa6ursjIyOLi4vj4+N/f3+3t7fT09LCwsHZ2dubm5r6+vmZmZv///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OEY4NTZERTQ5QUFBMTFFMUE5MTVDOTM5MUZGMTE3M0QiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OEY4NTZERTU5QUFBMTFFMUE5MTVDOTM5MUZGMTE3M0QiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4Rjg1NkRFMjlBQUExMUUxQTkxNUM5MzkxRkYxMTczRCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4Rjg1NkRFMzlBQUExMUUxQTkxNUM5MzkxRkYxMTczRCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAB8ALAAAAAAVABUAAAVI4CeOZGmeaKqubKtylktSgCOLRyLd3+QJEJnh4VHcMoOfYQXQLBcBD4PA6ngGlIInEHEhPOANRkaIFhq8SuHCE1Hb8Lh8LgsBADs=";
Editor.darkCheckmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg==";Editor.darkHelpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=";
Editor.lightHelpImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBmaWxsPSJub25lIiBkPSJNMCAwaDI0djI0SDB6Ii8+PHBhdGggZD0iTTExIDE4aDJ2LTJoLTJ2MnptMS0xNkM2LjQ4IDIgMiA2LjQ4IDIgMTJzNC40OCAxMCAxMCAxMCAxMC00LjQ4IDEwLTEwUzE3LjUyIDIgMTIgMnptMCAxOGMtNC40MSAwLTgtMy41OS04LThzMy41OS04IDgtOCA4IDMuNTkgOCA4LTMuNTkgOC04IDh6bTAtMTRjLTIuMjEgMC00IDEuNzktNCA0aDJjMC0xLjEuOS0yIDItMnMyIC45IDIgMmMwIDItMyAxLjc1LTMgNWgyYzAtMi4yNSAzLTIuNSAzLTUgMC0yLjIxLTEuNzktNC00LTR6Ii8+PC9zdmc+";
@@ -1986,240 +1986,240 @@ Editor.roughFillStyles=[{val:"auto",dispName:"Auto"},{val:"hachure",dispName:"Ha
Editor.fillStyles=[{val:"auto",dispName:"Auto"},{val:"hatch",dispName:"Hatch"},{val:"solid",dispName:"Solid"},{val:"dots",dispName:"Dots"},{val:"cross-hatch",dispName:"Cross Hatch"},{val:"dashed",dispName:"Dashed"},{val:"zigzag-line",dispName:"ZigZag Line"}];Editor.themes=null;Editor.ctrlKey=mxClient.IS_MAC?"Cmd":"Ctrl";Editor.hintOffset=20;Editor.shapePickerHoverDelay=300;Editor.fitWindowBorders=null;Editor.popupsAllowed=null!=window.urlParams?"1"!=urlParams.noDevice:!0;Editor.simpleLabels=!1;
Editor.enableNativeCipboard=window==window.top&&!mxClient.IS_FF&&null!=navigator.clipboard;Editor.sketchMode=!1;Editor.darkMode=!1;Editor.currentTheme=uiTheme;Editor.darkColor="#2a2a2a";Editor.lightColor="#f0f0f0";Editor.isDarkMode=function(b){return Editor.darkMode};Editor.isPngDataUrl=function(b){return null!=b&&"data:image/png;"==b.substring(0,15)};
Editor.isPngData=function(b){return 8<b.length&&137==b.charCodeAt(0)&&80==b.charCodeAt(1)&&78==b.charCodeAt(2)&&71==b.charCodeAt(3)&&13==b.charCodeAt(4)&&10==b.charCodeAt(5)&&26==b.charCodeAt(6)&&10==b.charCodeAt(7)};
-Editor.extractGraphModelFromPng=function(b){var e=null;try{var k=b.substring(b.indexOf(",")+1),m=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0);EditorUi.parsePng(m,mxUtils.bind(this,function(C,p,F){C=m.substring(C+8,C+8+F);"zTXt"==p?(F=C.indexOf(String.fromCharCode(0)),"mxGraphModel"==C.substring(0,F)&&(C=pako.inflateRaw(Graph.stringToArrayBuffer(C.substring(F+2)),{to:"string"}).replace(/\+/g," "),null!=C&&0<C.length&&(e=C))):"tEXt"==p&&(C=C.split(String.fromCharCode(0)),1<C.length&&("mxGraphModel"==
-C[0]||"mxfile"==C[0])&&(e=C[1]));if(null!=e||"IDAT"==p)return!0}))}catch(C){}null!=e&&"%"==e.charAt(0)&&(e=decodeURIComponent(e));null!=e&&"%"==e.charAt(0)&&(e=decodeURIComponent(e));return e};mxUtils.extend(Editor,mxEventSource);Editor.prototype.originalNoForeignObject=mxClient.NO_FO;Editor.prototype.transparentImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhMAAwAIAAAP///wAAACH5BAEAAAAALAAAAAAwADAAAAIxhI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8egpAAA7":IMAGE_PATH+"/transparent.gif";
+Editor.extractGraphModelFromPng=function(b){var d=null;try{var g=b.substring(b.indexOf(",")+1),l=window.atob&&!mxClient.IS_SF?atob(g):Base64.decode(g,!0);EditorUi.parsePng(l,mxUtils.bind(this,function(D,p,E){D=l.substring(D+8,D+8+E);"zTXt"==p?(E=D.indexOf(String.fromCharCode(0)),"mxGraphModel"==D.substring(0,E)&&(D=pako.inflateRaw(Graph.stringToArrayBuffer(D.substring(E+2)),{to:"string"}).replace(/\+/g," "),null!=D&&0<D.length&&(d=D))):"tEXt"==p&&(D=D.split(String.fromCharCode(0)),1<D.length&&("mxGraphModel"==
+D[0]||"mxfile"==D[0])&&(d=D[1]));if(null!=d||"IDAT"==p)return!0}))}catch(D){}null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d));null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d));return d};mxUtils.extend(Editor,mxEventSource);Editor.prototype.originalNoForeignObject=mxClient.NO_FO;Editor.prototype.transparentImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhMAAwAIAAAP///wAAACH5BAEAAAAALAAAAAAwADAAAAIxhI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8egpAAA7":IMAGE_PATH+"/transparent.gif";
Editor.prototype.extendCanvas=!0;Editor.prototype.chromeless=!1;Editor.prototype.cancelFirst=!0;Editor.prototype.enabled=!0;Editor.prototype.filename=null;Editor.prototype.modified=!1;Editor.prototype.autosave=!0;Editor.prototype.initialTopSpacing=0;Editor.prototype.appName=document.title;Editor.prototype.editBlankUrl=window.location.protocol+"//"+window.location.host+"/";Editor.prototype.defaultGraphOverflow="hidden";Editor.prototype.init=function(){};Editor.prototype.isChromelessView=function(){return this.chromeless};
Editor.prototype.setAutosave=function(b){this.autosave=b;this.fireEvent(new mxEventObject("autosaveChanged"))};Editor.prototype.getEditBlankUrl=function(b){return this.editBlankUrl+b};
-Editor.prototype.editAsNew=function(b,e){e=null!=e?"?title="+encodeURIComponent(e):"";null!=urlParams.ui&&(e+=(0<e.length?"&":"?")+"ui="+urlParams.ui);if("undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var k=null,m=mxUtils.bind(this,function(C){"ready"==C.data&&C.source==k&&(mxEvent.removeListener(window,"message",m),k.postMessage(b,"*"))});mxEvent.addListener(window,"message",m);k=this.graph.openLink(this.getEditBlankUrl(e+(0<e.length?"&":"?")+"client=1"),
-null,!0)}else this.graph.openLink(this.getEditBlankUrl(e)+"#R"+encodeURIComponent(b))};Editor.prototype.createGraph=function(b,e){b=new Graph(null,e,null,null,b);b.transparentBackground=!1;var k=b.isCssTransformsSupported,m=this;b.isCssTransformsSupported=function(){return k.apply(this,arguments)&&(!m.chromeless||!mxClient.IS_SF)};this.chromeless||(b.isBlankLink=function(C){return!this.isExternalProtocol(C)});return b};
+Editor.prototype.editAsNew=function(b,d){d=null!=d?"?title="+encodeURIComponent(d):"";null!=urlParams.ui&&(d+=(0<d.length?"&":"?")+"ui="+urlParams.ui);if("undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var g=null,l=mxUtils.bind(this,function(D){"ready"==D.data&&D.source==g&&(mxEvent.removeListener(window,"message",l),g.postMessage(b,"*"))});mxEvent.addListener(window,"message",l);g=this.graph.openLink(this.getEditBlankUrl(d+(0<d.length?"&":"?")+"client=1"),
+null,!0)}else this.graph.openLink(this.getEditBlankUrl(d)+"#R"+encodeURIComponent(b))};Editor.prototype.createGraph=function(b,d){b=new Graph(null,d,null,null,b);b.transparentBackground=!1;var g=b.isCssTransformsSupported,l=this;b.isCssTransformsSupported=function(){return g.apply(this,arguments)&&(!l.chromeless||!mxClient.IS_SF)};this.chromeless||(b.isBlankLink=function(D){return!this.isExternalProtocol(D)});return b};
Editor.prototype.resetGraph=function(){this.graph.gridEnabled=this.graph.defaultGridEnabled&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.graphHandler.guidesEnabled=!0;this.graph.setTooltips(!0);this.graph.setConnectable(!0);this.graph.foldingEnabled=!0;this.graph.scrollbars=this.graph.defaultScrollbars;this.graph.pageVisible=this.graph.defaultPageVisible;this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;this.graph.background=
null;this.graph.pageScale=mxGraph.prototype.pageScale;this.graph.pageFormat=mxGraph.prototype.pageFormat;this.graph.currentScale=1;this.graph.currentTranslate.x=0;this.graph.currentTranslate.y=0;this.updateGraphComponents();this.graph.view.setScale(1)};
-Editor.prototype.readGraphState=function(b){var e=b.getAttribute("grid");if(null==e||""==e)e=this.graph.defaultGridEnabled?"1":"0";this.graph.gridEnabled="0"!=e&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.gridSize=parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize;this.graph.graphHandler.guidesEnabled="0"!=b.getAttribute("guides");this.graph.setTooltips("0"!=b.getAttribute("tooltips"));this.graph.setConnectable("0"!=b.getAttribute("connect"));this.graph.connectionArrowsEnabled=
-"0"!=b.getAttribute("arrows");this.graph.foldingEnabled="0"!=b.getAttribute("fold");this.isChromelessView()&&this.graph.foldingEnabled&&(this.graph.foldingEnabled="1"==urlParams.nav,this.graph.cellRenderer.forceControlClickHandler=this.graph.foldingEnabled);e=parseFloat(b.getAttribute("pageScale"));!isNaN(e)&&0<e?this.graph.pageScale=e:this.graph.pageScale=mxGraph.prototype.pageScale;this.graph.isLightboxView()||this.graph.isViewer()?this.graph.pageVisible=!1:(e=b.getAttribute("page"),this.graph.pageVisible=
-null!=e?"0"!=e:this.graph.defaultPageVisible);this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;e=parseFloat(b.getAttribute("pageWidth"));var k=parseFloat(b.getAttribute("pageHeight"));isNaN(e)||isNaN(k)||(this.graph.pageFormat=new mxRectangle(0,0,e,k));b=b.getAttribute("background");this.graph.background=null!=b&&0<b.length?b:null};
-Editor.prototype.setGraphXml=function(b){if(null!=b){var e=new mxCodec(b.ownerDocument);if("mxGraphModel"==b.nodeName){this.graph.model.beginUpdate();try{this.graph.model.clear(),this.graph.view.scale=1,this.readGraphState(b),this.updateGraphComponents(),e.decode(b,this.graph.getModel())}finally{this.graph.model.endUpdate()}this.fireEvent(new mxEventObject("resetGraphView"))}else if("root"==b.nodeName){this.resetGraph();var k=e.document.createElement("mxGraphModel");k.appendChild(b);e.decode(k,this.graph.getModel());
+Editor.prototype.readGraphState=function(b){var d=b.getAttribute("grid");if(null==d||""==d)d=this.graph.defaultGridEnabled?"1":"0";this.graph.gridEnabled="0"!=d&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.gridSize=parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize;this.graph.graphHandler.guidesEnabled="0"!=b.getAttribute("guides");this.graph.setTooltips("0"!=b.getAttribute("tooltips"));this.graph.setConnectable("0"!=b.getAttribute("connect"));this.graph.connectionArrowsEnabled=
+"0"!=b.getAttribute("arrows");this.graph.foldingEnabled="0"!=b.getAttribute("fold");this.isChromelessView()&&this.graph.foldingEnabled&&(this.graph.foldingEnabled="1"==urlParams.nav,this.graph.cellRenderer.forceControlClickHandler=this.graph.foldingEnabled);d=parseFloat(b.getAttribute("pageScale"));!isNaN(d)&&0<d?this.graph.pageScale=d:this.graph.pageScale=mxGraph.prototype.pageScale;this.graph.isLightboxView()||this.graph.isViewer()?this.graph.pageVisible=!1:(d=b.getAttribute("page"),this.graph.pageVisible=
+null!=d?"0"!=d:this.graph.defaultPageVisible);this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;d=parseFloat(b.getAttribute("pageWidth"));var g=parseFloat(b.getAttribute("pageHeight"));isNaN(d)||isNaN(g)||(this.graph.pageFormat=new mxRectangle(0,0,d,g));b=b.getAttribute("background");this.graph.background=null!=b&&0<b.length?b:null};
+Editor.prototype.setGraphXml=function(b){if(null!=b){var d=new mxCodec(b.ownerDocument);if("mxGraphModel"==b.nodeName){this.graph.model.beginUpdate();try{this.graph.model.clear(),this.graph.view.scale=1,this.readGraphState(b),this.updateGraphComponents(),d.decode(b,this.graph.getModel())}finally{this.graph.model.endUpdate()}this.fireEvent(new mxEventObject("resetGraphView"))}else if("root"==b.nodeName){this.resetGraph();var g=d.document.createElement("mxGraphModel");g.appendChild(b);d.decode(g,this.graph.getModel());
this.updateGraphComponents();this.fireEvent(new mxEventObject("resetGraphView"))}else throw{message:mxResources.get("cannotOpenFile"),node:b,toString:function(){return this.message}};}else this.resetGraph(),this.graph.model.clear(),this.fireEvent(new mxEventObject("resetGraphView"))};
Editor.prototype.getGraphXml=function(b){b=(null!=b?b:1)?(new mxCodec(mxUtils.createXmlDocument())).encode(this.graph.getModel()):this.graph.encodeCells(mxUtils.sortCells(this.graph.model.getTopmostCells(this.graph.getSelectionCells())));if(0!=this.graph.view.translate.x||0!=this.graph.view.translate.y)b.setAttribute("dx",Math.round(100*this.graph.view.translate.x)/100),b.setAttribute("dy",Math.round(100*this.graph.view.translate.y)/100);b.setAttribute("grid",this.graph.isGridEnabled()?"1":"0");b.setAttribute("gridSize",
this.graph.gridSize);b.setAttribute("guides",this.graph.graphHandler.guidesEnabled?"1":"0");b.setAttribute("tooltips",this.graph.tooltipHandler.isEnabled()?"1":"0");b.setAttribute("connect",this.graph.connectionHandler.isEnabled()?"1":"0");b.setAttribute("arrows",this.graph.connectionArrowsEnabled?"1":"0");b.setAttribute("fold",this.graph.foldingEnabled?"1":"0");b.setAttribute("page",this.graph.pageVisible?"1":"0");b.setAttribute("pageScale",this.graph.pageScale);b.setAttribute("pageWidth",this.graph.pageFormat.width);
b.setAttribute("pageHeight",this.graph.pageFormat.height);null!=this.graph.background&&b.setAttribute("background",this.graph.background);return b};Editor.prototype.updateGraphComponents=function(){var b=this.graph;null!=b.container&&(b.view.validateBackground(),b.container.style.overflow=b.scrollbars?"auto":this.defaultGraphOverflow,this.fireEvent(new mxEventObject("updateGraphComponents")))};Editor.prototype.setModified=function(b){this.modified=b};
Editor.prototype.setFilename=function(b){this.filename=b};
-Editor.prototype.createUndoManager=function(){var b=this.graph,e=new mxUndoManager;this.undoListener=function(m,C){e.undoableEditHappened(C.getProperty("edit"))};var k=mxUtils.bind(this,function(m,C){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,k);b.getView().addListener(mxEvent.UNDO,k);k=function(m,C){m=b.getSelectionCellsForChanges(C.getProperty("edit").changes,function(F){return!(F instanceof mxChildChange)});if(0<m.length){b.getModel();C=[];for(var p=0;p<m.length;p++)null!=
-b.view.getState(m[p])&&C.push(m[p]);b.setSelectionCells(C)}};e.addListener(mxEvent.UNDO,k);e.addListener(mxEvent.REDO,k);return e};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(b){this.consumer=this.producer=null;this.done=b;this.args=null};OpenFile.prototype.setConsumer=function(b){this.consumer=b;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};
+Editor.prototype.createUndoManager=function(){var b=this.graph,d=new mxUndoManager;this.undoListener=function(l,D){d.undoableEditHappened(D.getProperty("edit"))};var g=mxUtils.bind(this,function(l,D){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,g);b.getView().addListener(mxEvent.UNDO,g);g=function(l,D){l=b.getSelectionCellsForChanges(D.getProperty("edit").changes,function(E){return!(E instanceof mxChildChange)});if(0<l.length){b.getModel();D=[];for(var p=0;p<l.length;p++)null!=
+b.view.getState(l[p])&&D.push(l[p]);b.setSelectionCells(D)}};d.addListener(mxEvent.UNDO,g);d.addListener(mxEvent.REDO,g);return d};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(b){this.consumer=this.producer=null;this.done=b;this.args=null};OpenFile.prototype.setConsumer=function(b){this.consumer=b;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};
OpenFile.prototype.error=function(b){this.cancel(!0);mxUtils.alert(b)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(b){null!=this.done&&this.done(null!=b?b:!0)};
-function Dialog(b,e,k,m,C,p,F,L,P,d,f){var g=P?57:0,x=k,y=m,t=P?0:64,G=Editor.inlineFullscreen||null==b.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(G.height=window.innerHeight);var D=G.height,I=Math.max(1,Math.round((G.width-k-t)/2)),H=Math.max(1,Math.round((D-m-b.footerHeight)/3));e.style.maxHeight="100%";k=null!=document.body?Math.min(k,document.body.scrollWidth-t):k;m=Math.min(m,D-t);0<b.dialogs.length&&(this.zIndex+=
-2*b.dialogs.length);null==this.bg&&(this.bg=b.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=D+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));G=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=G.x+"px";this.bg.style.top=G.y+"px";I+=G.x;H+=G.y;Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px",
-H+=b.embedViewport.y,I+=b.embedViewport.x);C&&document.body.appendChild(this.bg);var S=b.createDiv(P?"geTransDialog":"geDialog");C=this.getPosition(I,H,k,m);I=C.x;H=C.y;S.style.width=k+"px";S.style.height=m+"px";S.style.left=I+"px";S.style.top=H+"px";S.style.zIndex=this.zIndex;S.appendChild(e);document.body.appendChild(S);!L&&e.clientHeight>S.clientHeight-t&&(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=H+14+"px",p.style.left=I+k+38-g+"px",p.style.zIndex=this.zIndex,mxEvent.addListener(p,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(p),this.dialogImg=p,!f)){var T=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(M){T=!0}),null,mxUtils.bind(this,function(M){T&&(b.hideDialog(!0),T=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=d){var M=d();
-null!=M&&(x=k=M.w,y=m=M.h)}M=mxUtils.getDocumentSize();D=M.height;this.bg.style.height=D+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");I=Math.max(1,Math.round((M.width-k-t)/2));H=Math.max(1,Math.round((D-m-b.footerHeight)/3));k=null!=document.body?Math.min(x,document.body.scrollWidth-t):x;m=Math.min(y,D-t);M=this.getPosition(I,H,k,m);I=M.x;H=M.y;S.style.left=I+"px";S.style.top=H+"px";S.style.width=k+"px";S.style.height=m+"px";!L&&
-e.clientHeight>S.clientHeight-t&&(e.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=H+14+"px",this.dialogImg.style.left=I+k+38-g+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=F;this.container=S;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
+function Dialog(b,d,g,l,D,p,E,N,R,G,M){var Q=R?57:0,e=g,f=l,k=R?0:64,z=Editor.inlineFullscreen||null==b.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(z.height=window.innerHeight);var t=z.height,B=Math.max(1,Math.round((z.width-g-k)/2)),I=Math.max(1,Math.round((t-l-b.footerHeight)/3));d.style.maxHeight="100%";g=null!=document.body?Math.min(g,document.body.scrollWidth-k):g;l=Math.min(l,t-k);0<b.dialogs.length&&(this.zIndex+=
+2*b.dialogs.length);null==this.bg&&(this.bg=b.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=t+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));z=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=z.x+"px";this.bg.style.top=z.y+"px";B+=z.x;I+=z.y;Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px",
+I+=b.embedViewport.y,B+=b.embedViewport.x);D&&document.body.appendChild(this.bg);var O=b.createDiv(R?"geTransDialog":"geDialog");D=this.getPosition(B,I,g,l);B=D.x;I=D.y;O.style.width=g+"px";O.style.height=l+"px";O.style.left=B+"px";O.style.top=I+"px";O.style.zIndex=this.zIndex;O.appendChild(d);document.body.appendChild(O);!N&&d.clientHeight>O.clientHeight-k&&(d.style.overflowY="auto");d.style.overflowX="hidden";if(p&&(p=document.createElement("img"),p.setAttribute("src",Dialog.prototype.closeImage),
+p.setAttribute("title",mxResources.get("close")),p.className="geDialogClose",p.style.top=I+14+"px",p.style.left=B+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,!M)){var J=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(y){J=!0}),null,mxUtils.bind(this,function(y){J&&(b.hideDialog(!0),J=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=G){var y=G();
+null!=y&&(e=g=y.w,f=l=y.h)}y=mxUtils.getDocumentSize();t=y.height;this.bg.style.height=t+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");B=Math.max(1,Math.round((y.width-g-k)/2));I=Math.max(1,Math.round((t-l-b.footerHeight)/3));g=null!=document.body?Math.min(e,document.body.scrollWidth-k):e;l=Math.min(f,t-k);y=this.getPosition(B,I,g,l);B=y.x;I=y.y;O.style.left=B+"px";O.style.top=I+"px";O.style.width=g+"px";O.style.height=l+"px";!N&&
+d.clientHeight>O.clientHeight-k&&(d.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=I+14+"px",this.dialogImg.style.left=B+g+38-Q+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=E;this.container=O;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+
"/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png";
Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==":IMAGE_PATH+
-"/clear.gif";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(b,e){return new mxPoint(b,e)};Dialog.prototype.close=function(b,e){if(null!=this.onDialogClose){if(0==this.onDialogClose(b,e))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};
-var ErrorDialog=function(b,e,k,m,C,p,F,L,P,d,f){P=null!=P?P:!0;var g=document.createElement("div");g.style.textAlign="center";if(null!=e){var x=document.createElement("div");x.style.padding="0px";x.style.margin="0px";x.style.fontSize="18px";x.style.paddingBottom="16px";x.style.marginBottom="10px";x.style.borderBottom="1px solid #c0c0c0";x.style.color="gray";x.style.whiteSpace="nowrap";x.style.textOverflow="ellipsis";x.style.overflow="hidden";mxUtils.write(x,e);x.setAttribute("title",e);g.appendChild(x)}e=
-document.createElement("div");e.style.lineHeight="1.2em";e.style.padding="6px";e.innerHTML=k;g.appendChild(e);k=document.createElement("div");k.style.marginTop="12px";k.style.textAlign="center";null!=p&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();p()}),e.className="geBtn",k.appendChild(e),k.style.textAlign="center");null!=d&&(d=mxUtils.button(d,function(){null!=f&&f()}),d.className="geBtn",k.appendChild(d));var y=mxUtils.button(m,function(){P&&b.hideDialog();null!=C&&C()});
-y.className="geBtn";k.appendChild(y);null!=F&&(m=mxUtils.button(F,function(){P&&b.hideDialog();null!=L&&L()}),m.className="geBtn gePrimaryBtn",k.appendChild(m));this.init=function(){y.focus()};g.appendChild(k);this.container=g},PrintDialog=function(b,e){this.create(b,e)};
-PrintDialog.prototype.create=function(b){function e(y){var t=F.checked||d.checked,G=parseInt(g.value)/100;isNaN(G)&&(G=1,g.value="100%");G*=.75;var D=k.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,I=1/k.pageScale;if(t){var H=F.checked?1:parseInt(f.value);isNaN(H)||(I=mxUtils.getScaleForPageCount(H,k,D))}k.getGraphBounds();var S=H=0;D=mxRectangle.fromRectangle(D);D.width=Math.ceil(D.width*G);D.height=Math.ceil(D.height*G);I*=G;!t&&k.pageVisible?(G=k.getPageLayout(),H-=G.x*D.width,S-=G.y*D.height):
-t=!0;t=PrintDialog.createPrintPreview(k,I,D,0,H,S,t);t.open();y&&PrintDialog.printPreview(t)}var k=b.editor.graph,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var C=document.createElement("tbody");var p=document.createElement("tr");var F=document.createElement("input");F.setAttribute("type","checkbox");var L=document.createElement("td");L.setAttribute("colspan","2");L.style.fontSize="10pt";L.appendChild(F);var P=document.createElement("span");mxUtils.write(P," "+mxResources.get("fitPage"));
-L.appendChild(P);mxEvent.addListener(P,"click",function(y){F.checked=!F.checked;d.checked=!F.checked;mxEvent.consume(y)});mxEvent.addListener(F,"change",function(){d.checked=!F.checked});p.appendChild(L);C.appendChild(p);p=p.cloneNode(!1);var d=document.createElement("input");d.setAttribute("type","checkbox");L=document.createElement("td");L.style.fontSize="10pt";L.appendChild(d);P=document.createElement("span");mxUtils.write(P," "+mxResources.get("posterPrint")+":");L.appendChild(P);mxEvent.addListener(P,
-"click",function(y){d.checked=!d.checked;F.checked=!d.checked;mxEvent.consume(y)});p.appendChild(L);var f=document.createElement("input");f.setAttribute("value","1");f.setAttribute("type","number");f.setAttribute("min","1");f.setAttribute("size","4");f.setAttribute("disabled","disabled");f.style.width="50px";L=document.createElement("td");L.style.fontSize="10pt";L.appendChild(f);mxUtils.write(L," "+mxResources.get("pages")+" (max)");p.appendChild(L);C.appendChild(p);mxEvent.addListener(d,"change",
-function(){d.checked?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled");F.checked=!d.checked});p=p.cloneNode(!1);L=document.createElement("td");mxUtils.write(L,mxResources.get("pageScale")+":");p.appendChild(L);L=document.createElement("td");var g=document.createElement("input");g.setAttribute("value","100 %");g.setAttribute("size","5");g.style.width="50px";L.appendChild(g);p.appendChild(L);C.appendChild(p);p=document.createElement("tr");L=document.createElement("td");L.colSpan=2;
-L.style.paddingTop="20px";L.setAttribute("align","right");P=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});P.className="geBtn";b.editor.cancelFirst&&L.appendChild(P);if(PrintDialog.previewEnabled){var x=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();e(!1)});x.className="geBtn";L.appendChild(x)}x=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();e(!0)});x.className="geBtn gePrimaryBtn";L.appendChild(x);b.editor.cancelFirst||
-L.appendChild(P);p.appendChild(L);C.appendChild(p);m.appendChild(C);this.container=m};PrintDialog.printPreview=function(b){try{if(null!=b.wnd){var e=function(){b.wnd.focus();b.wnd.print();b.wnd.close()};mxClient.IS_GC?window.setTimeout(e,500):e()}}catch(k){}};
-PrintDialog.createPrintPreview=function(b,e,k,m,C,p,F){e=new mxPrintPreview(b,e,k,m,C,p);e.title=mxResources.get("preview");e.printBackgroundImage=!0;e.autoOrigin=F;b=b.background;if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";e.backgroundColor=b;var L=e.writeHead;e.writeHead=function(P){L.apply(this,arguments);P.writeln('<style type="text/css">');P.writeln("@media screen {");P.writeln(" body > div { padding:30px;box-sizing:content-box; }");P.writeln("}");P.writeln("</style>")};return e};
+"/clear.gif";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(b,d){return new mxPoint(b,d)};Dialog.prototype.close=function(b,d){if(null!=this.onDialogClose){if(0==this.onDialogClose(b,d))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};
+var ErrorDialog=function(b,d,g,l,D,p,E,N,R,G,M){R=null!=R?R:!0;var Q=document.createElement("div");Q.style.textAlign="center";if(null!=d){var e=document.createElement("div");e.style.padding="0px";e.style.margin="0px";e.style.fontSize="18px";e.style.paddingBottom="16px";e.style.marginBottom="10px";e.style.borderBottom="1px solid #c0c0c0";e.style.color="gray";e.style.whiteSpace="nowrap";e.style.textOverflow="ellipsis";e.style.overflow="hidden";mxUtils.write(e,d);e.setAttribute("title",d);Q.appendChild(e)}d=
+document.createElement("div");d.style.lineHeight="1.2em";d.style.padding="6px";d.innerHTML=g;Q.appendChild(d);g=document.createElement("div");g.style.marginTop="12px";g.style.textAlign="center";null!=p&&(d=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();p()}),d.className="geBtn",g.appendChild(d),g.style.textAlign="center");null!=G&&(G=mxUtils.button(G,function(){null!=M&&M()}),G.className="geBtn",g.appendChild(G));var f=mxUtils.button(l,function(){R&&b.hideDialog();null!=D&&D()});
+f.className="geBtn";g.appendChild(f);null!=E&&(l=mxUtils.button(E,function(){R&&b.hideDialog();null!=N&&N()}),l.className="geBtn gePrimaryBtn",g.appendChild(l));this.init=function(){f.focus()};Q.appendChild(g);this.container=Q},PrintDialog=function(b,d){this.create(b,d)};
+PrintDialog.prototype.create=function(b){function d(f){var k=E.checked||G.checked,z=parseInt(Q.value)/100;isNaN(z)&&(z=1,Q.value="100%");z*=.75;var t=g.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,B=1/g.pageScale;if(k){var I=E.checked?1:parseInt(M.value);isNaN(I)||(B=mxUtils.getScaleForPageCount(I,g,t))}g.getGraphBounds();var O=I=0;t=mxRectangle.fromRectangle(t);t.width=Math.ceil(t.width*z);t.height=Math.ceil(t.height*z);B*=z;!k&&g.pageVisible?(z=g.getPageLayout(),I-=z.x*t.width,O-=z.y*t.height):
+k=!0;k=PrintDialog.createPrintPreview(g,B,t,0,I,O,k);k.open();f&&PrintDialog.printPreview(k)}var g=b.editor.graph,l=document.createElement("table");l.style.width="100%";l.style.height="100%";var D=document.createElement("tbody");var p=document.createElement("tr");var E=document.createElement("input");E.setAttribute("type","checkbox");var N=document.createElement("td");N.setAttribute("colspan","2");N.style.fontSize="10pt";N.appendChild(E);var R=document.createElement("span");mxUtils.write(R," "+mxResources.get("fitPage"));
+N.appendChild(R);mxEvent.addListener(R,"click",function(f){E.checked=!E.checked;G.checked=!E.checked;mxEvent.consume(f)});mxEvent.addListener(E,"change",function(){G.checked=!E.checked});p.appendChild(N);D.appendChild(p);p=p.cloneNode(!1);var G=document.createElement("input");G.setAttribute("type","checkbox");N=document.createElement("td");N.style.fontSize="10pt";N.appendChild(G);R=document.createElement("span");mxUtils.write(R," "+mxResources.get("posterPrint")+":");N.appendChild(R);mxEvent.addListener(R,
+"click",function(f){G.checked=!G.checked;E.checked=!G.checked;mxEvent.consume(f)});p.appendChild(N);var M=document.createElement("input");M.setAttribute("value","1");M.setAttribute("type","number");M.setAttribute("min","1");M.setAttribute("size","4");M.setAttribute("disabled","disabled");M.style.width="50px";N=document.createElement("td");N.style.fontSize="10pt";N.appendChild(M);mxUtils.write(N," "+mxResources.get("pages")+" (max)");p.appendChild(N);D.appendChild(p);mxEvent.addListener(G,"change",
+function(){G.checked?M.removeAttribute("disabled"):M.setAttribute("disabled","disabled");E.checked=!G.checked});p=p.cloneNode(!1);N=document.createElement("td");mxUtils.write(N,mxResources.get("pageScale")+":");p.appendChild(N);N=document.createElement("td");var Q=document.createElement("input");Q.setAttribute("value","100 %");Q.setAttribute("size","5");Q.style.width="50px";N.appendChild(Q);p.appendChild(N);D.appendChild(p);p=document.createElement("tr");N=document.createElement("td");N.colSpan=2;
+N.style.paddingTop="20px";N.setAttribute("align","right");R=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});R.className="geBtn";b.editor.cancelFirst&&N.appendChild(R);if(PrintDialog.previewEnabled){var e=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();d(!1)});e.className="geBtn";N.appendChild(e)}e=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();d(!0)});e.className="geBtn gePrimaryBtn";N.appendChild(e);b.editor.cancelFirst||
+N.appendChild(R);p.appendChild(N);D.appendChild(p);l.appendChild(D);this.container=l};PrintDialog.printPreview=function(b){try{if(null!=b.wnd){var d=function(){b.wnd.focus();b.wnd.print();b.wnd.close()};mxClient.IS_GC?window.setTimeout(d,500):d()}}catch(g){}};
+PrintDialog.createPrintPreview=function(b,d,g,l,D,p,E){d=new mxPrintPreview(b,d,g,l,D,p);d.title=mxResources.get("preview");d.printBackgroundImage=!0;d.autoOrigin=E;b=b.background;if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";d.backgroundColor=b;var N=d.writeHead;d.writeHead=function(R){N.apply(this,arguments);R.writeln('<style type="text/css">');R.writeln("@media screen {");R.writeln(" body > div { padding:30px;box-sizing:content-box; }");R.writeln("}");R.writeln("</style>")};return d};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(b){function e(){null==f||f==mxConstants.NONE?(d.style.backgroundColor="",d.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(d.style.backgroundColor=f,d.style.backgroundImage="")}function k(){var D=t;null!=D&&Graph.isPageLink(D.src)&&(D=b.createImageForPageLink(D.src,null));null!=D&&null!=D.src?(y.setAttribute("src",D.src),y.style.display=""):(y.removeAttribute("src"),y.style.display="none")}var m=b.editor.graph,C=document.createElement("table");C.style.width=
-"100%";C.style.height="100%";var p=document.createElement("tbody");var F=document.createElement("tr");var L=document.createElement("td");L.style.verticalAlign="top";L.style.fontSize="10pt";mxUtils.write(L,mxResources.get("paperSize")+":");F.appendChild(L);L=document.createElement("td");L.style.verticalAlign="top";L.style.fontSize="10pt";var P=PageSetupDialog.addPageFormatPanel(L,"pagesetupdialog",m.pageFormat);F.appendChild(L);p.appendChild(F);F=document.createElement("tr");L=document.createElement("td");
-mxUtils.write(L,mxResources.get("background")+":");F.appendChild(L);L=document.createElement("td");L.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var d=document.createElement("button");d.style.width="22px";d.style.height="22px";d.style.cursor="pointer";d.style.marginRight="20px";d.style.backgroundPosition="center center";d.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(d.style.position="relative",d.style.top="-6px");var f=m.background;e();mxEvent.addListener(d,
-"click",function(D){b.pickColor(f||"none",function(I){f=I;e()});mxEvent.consume(D)});L.appendChild(d);mxUtils.write(L,mxResources.get("gridSize")+":");var g=document.createElement("input");g.setAttribute("type","number");g.setAttribute("min","0");g.style.width="40px";g.style.marginLeft="6px";g.value=m.getGridSize();L.appendChild(g);mxEvent.addListener(g,"change",function(){var D=parseInt(g.value);g.value=Math.max(1,isNaN(D)?m.getGridSize():D)});F.appendChild(L);p.appendChild(F);F=document.createElement("tr");
-L=document.createElement("td");mxUtils.write(L,mxResources.get("image")+":");F.appendChild(L);L=document.createElement("td");var x=document.createElement("button");x.className="geBtn";x.style.margin="0px";mxUtils.write(x,mxResources.get("change")+"...");var y=document.createElement("img");y.setAttribute("valign","middle");y.style.verticalAlign="middle";y.style.border="1px solid lightGray";y.style.borderRadius="4px";y.style.marginRight="14px";y.style.maxWidth="100px";y.style.cursor="pointer";y.style.height=
-"60px";y.style.padding="4px";var t=m.backgroundImage,G=function(D){b.showBackgroundImageDialog(function(I,H){H||(t=I,k())},t);mxEvent.consume(D)};mxEvent.addListener(x,"click",G);mxEvent.addListener(y,"click",G);k();L.appendChild(y);L.appendChild(x);F.appendChild(L);p.appendChild(F);F=document.createElement("tr");L=document.createElement("td");L.colSpan=2;L.style.paddingTop="16px";L.setAttribute("align","right");x=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});x.className="geBtn";
-b.editor.cancelFirst&&L.appendChild(x);G=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var D=parseInt(g.value);isNaN(D)||m.gridSize===D||m.setGridSize(D);D=new ChangePageSetup(b,f,t,P.get());D.ignoreColor=m.background==f;D.ignoreImage=(null!=m.backgroundImage?m.backgroundImage.src:null)===(null!=t?t.src:null);m.pageFormat.width==D.previousFormat.width&&m.pageFormat.height==D.previousFormat.height&&D.ignoreColor&&D.ignoreImage||m.model.execute(D)});G.className="geBtn gePrimaryBtn";
-L.appendChild(G);b.editor.cancelFirst||L.appendChild(x);F.appendChild(L);p.appendChild(F);C.appendChild(p);this.container=C};
-PageSetupDialog.addPageFormatPanel=function(b,e,k,m){function C(M,fa,la){if(la||g!=document.activeElement&&x!=document.activeElement){M=!1;for(fa=0;fa<t.length;fa++)la=t[fa],H?"custom"==la.key&&(L.value=la.key,H=!1):null!=la.format&&("a4"==la.key?826==k.width?(k=mxRectangle.fromRectangle(k),k.width=827):826==k.height&&(k=mxRectangle.fromRectangle(k),k.height=827):"a5"==la.key&&(584==k.width?(k=mxRectangle.fromRectangle(k),k.width=583):584==k.height&&(k=mxRectangle.fromRectangle(k),k.height=583)),
-k.width==la.format.width&&k.height==la.format.height?(L.value=la.key,p.setAttribute("checked","checked"),p.defaultChecked=!0,p.checked=!0,F.removeAttribute("checked"),F.defaultChecked=!1,F.checked=!1,M=!0):k.width==la.format.height&&k.height==la.format.width&&(L.value=la.key,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,F.setAttribute("checked","checked"),F.defaultChecked=!0,M=F.checked=!0));M?(P.style.display="",f.style.display="none"):(g.value=k.width/100,x.value=k.height/100,p.setAttribute("checked",
-"checked"),L.value="custom",P.style.display="none",f.style.display="")}}e="format-"+e;var p=document.createElement("input");p.setAttribute("name",e);p.setAttribute("type","radio");p.setAttribute("value","portrait");var F=document.createElement("input");F.setAttribute("name",e);F.setAttribute("type","radio");F.setAttribute("value","landscape");var L=document.createElement("select");L.style.marginBottom="8px";L.style.borderRadius="4px";L.style.border="1px solid rgb(160, 160, 160)";L.style.width="206px";
-var P=document.createElement("div");P.style.marginLeft="4px";P.style.width="210px";P.style.height="24px";p.style.marginRight="6px";P.appendChild(p);e=document.createElement("span");e.style.maxWidth="100px";mxUtils.write(e,mxResources.get("portrait"));P.appendChild(e);F.style.marginLeft="10px";F.style.marginRight="6px";P.appendChild(F);var d=document.createElement("span");d.style.width="100px";mxUtils.write(d,mxResources.get("landscape"));P.appendChild(d);var f=document.createElement("div");f.style.marginLeft=
-"4px";f.style.width="210px";f.style.height="24px";var g=document.createElement("input");g.setAttribute("size","7");g.style.textAlign="right";f.appendChild(g);mxUtils.write(f," in x ");var x=document.createElement("input");x.setAttribute("size","7");x.style.textAlign="right";f.appendChild(x);mxUtils.write(f," in");P.style.display="none";f.style.display="none";for(var y={},t=PageSetupDialog.getFormats(),G=0;G<t.length;G++){var D=t[G];y[D.key]=D;var I=document.createElement("option");I.setAttribute("value",
-D.key);mxUtils.write(I,D.title);L.appendChild(I)}var H=!1;C();b.appendChild(L);mxUtils.br(b);b.appendChild(P);b.appendChild(f);var S=k,T=function(M,fa){M=y[L.value];null!=M.format?(g.value=M.format.width/100,x.value=M.format.height/100,f.style.display="none",P.style.display=""):(P.style.display="none",f.style.display="");M=parseFloat(g.value);if(isNaN(M)||0>=M)g.value=k.width/100;M=parseFloat(x.value);if(isNaN(M)||0>=M)x.value=k.height/100;M=new mxRectangle(0,0,Math.floor(100*parseFloat(g.value)),
-Math.floor(100*parseFloat(x.value)));"custom"!=L.value&&F.checked&&(M=new mxRectangle(0,0,M.height,M.width));fa&&H||M.width==S.width&&M.height==S.height||(S=M,null!=m&&m(S))};mxEvent.addListener(e,"click",function(M){p.checked=!0;T(M);mxEvent.consume(M)});mxEvent.addListener(d,"click",function(M){F.checked=!0;T(M);mxEvent.consume(M)});mxEvent.addListener(g,"blur",T);mxEvent.addListener(g,"click",T);mxEvent.addListener(x,"blur",T);mxEvent.addListener(x,"click",T);mxEvent.addListener(F,"change",T);
-mxEvent.addListener(p,"change",T);mxEvent.addListener(L,"change",function(M){H="custom"==L.value;T(M,!0)});T();return{set:function(M){k=M;C(null,null,!0)},get:function(){return S},widthInput:g,heightInput:x}};
+var PageSetupDialog=function(b){function d(){null==M||M==mxConstants.NONE?(G.style.backgroundColor="",G.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(G.style.backgroundColor=M,G.style.backgroundImage="")}function g(){var t=k;null!=t&&Graph.isPageLink(t.src)&&(t=b.createImageForPageLink(t.src,null));null!=t&&null!=t.src?(f.setAttribute("src",t.src),f.style.display=""):(f.removeAttribute("src"),f.style.display="none")}var l=b.editor.graph,D=document.createElement("table");D.style.width=
+"100%";D.style.height="100%";var p=document.createElement("tbody");var E=document.createElement("tr");var N=document.createElement("td");N.style.verticalAlign="top";N.style.fontSize="10pt";mxUtils.write(N,mxResources.get("paperSize")+":");E.appendChild(N);N=document.createElement("td");N.style.verticalAlign="top";N.style.fontSize="10pt";var R=PageSetupDialog.addPageFormatPanel(N,"pagesetupdialog",l.pageFormat);E.appendChild(N);p.appendChild(E);E=document.createElement("tr");N=document.createElement("td");
+mxUtils.write(N,mxResources.get("background")+":");E.appendChild(N);N=document.createElement("td");N.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var G=document.createElement("button");G.style.width="22px";G.style.height="22px";G.style.cursor="pointer";G.style.marginRight="20px";G.style.backgroundPosition="center center";G.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(G.style.position="relative",G.style.top="-6px");var M=l.background;d();mxEvent.addListener(G,
+"click",function(t){b.pickColor(M||"none",function(B){M=B;d()});mxEvent.consume(t)});N.appendChild(G);mxUtils.write(N,mxResources.get("gridSize")+":");var Q=document.createElement("input");Q.setAttribute("type","number");Q.setAttribute("min","0");Q.style.width="40px";Q.style.marginLeft="6px";Q.value=l.getGridSize();N.appendChild(Q);mxEvent.addListener(Q,"change",function(){var t=parseInt(Q.value);Q.value=Math.max(1,isNaN(t)?l.getGridSize():t)});E.appendChild(N);p.appendChild(E);E=document.createElement("tr");
+N=document.createElement("td");mxUtils.write(N,mxResources.get("image")+":");E.appendChild(N);N=document.createElement("td");var e=document.createElement("button");e.className="geBtn";e.style.margin="0px";mxUtils.write(e,mxResources.get("change")+"...");var f=document.createElement("img");f.setAttribute("valign","middle");f.style.verticalAlign="middle";f.style.border="1px solid lightGray";f.style.borderRadius="4px";f.style.marginRight="14px";f.style.maxWidth="100px";f.style.cursor="pointer";f.style.height=
+"60px";f.style.padding="4px";var k=l.backgroundImage,z=function(t){b.showBackgroundImageDialog(function(B,I){I||(k=B,g())},k);mxEvent.consume(t)};mxEvent.addListener(e,"click",z);mxEvent.addListener(f,"click",z);g();N.appendChild(f);N.appendChild(e);E.appendChild(N);p.appendChild(E);E=document.createElement("tr");N=document.createElement("td");N.colSpan=2;N.style.paddingTop="16px";N.setAttribute("align","right");e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});e.className="geBtn";
+b.editor.cancelFirst&&N.appendChild(e);z=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var t=parseInt(Q.value);isNaN(t)||l.gridSize===t||l.setGridSize(t);t=new ChangePageSetup(b,M,k,R.get());t.ignoreColor=l.background==M;t.ignoreImage=(null!=l.backgroundImage?l.backgroundImage.src:null)===(null!=k?k.src:null);l.pageFormat.width==t.previousFormat.width&&l.pageFormat.height==t.previousFormat.height&&t.ignoreColor&&t.ignoreImage||l.model.execute(t)});z.className="geBtn gePrimaryBtn";
+N.appendChild(z);b.editor.cancelFirst||N.appendChild(e);E.appendChild(N);p.appendChild(E);D.appendChild(p);this.container=D};
+PageSetupDialog.addPageFormatPanel=function(b,d,g,l){function D(y,ia,da){if(da||Q!=document.activeElement&&e!=document.activeElement){y=!1;for(ia=0;ia<k.length;ia++)da=k[ia],I?"custom"==da.key&&(N.value=da.key,I=!1):null!=da.format&&("a4"==da.key?826==g.width?(g=mxRectangle.fromRectangle(g),g.width=827):826==g.height&&(g=mxRectangle.fromRectangle(g),g.height=827):"a5"==da.key&&(584==g.width?(g=mxRectangle.fromRectangle(g),g.width=583):584==g.height&&(g=mxRectangle.fromRectangle(g),g.height=583)),
+g.width==da.format.width&&g.height==da.format.height?(N.value=da.key,p.setAttribute("checked","checked"),p.defaultChecked=!0,p.checked=!0,E.removeAttribute("checked"),E.defaultChecked=!1,E.checked=!1,y=!0):g.width==da.format.height&&g.height==da.format.width&&(N.value=da.key,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,E.setAttribute("checked","checked"),E.defaultChecked=!0,y=E.checked=!0));y?(R.style.display="",M.style.display="none"):(Q.value=g.width/100,e.value=g.height/100,p.setAttribute("checked",
+"checked"),N.value="custom",R.style.display="none",M.style.display="")}}d="format-"+d;var p=document.createElement("input");p.setAttribute("name",d);p.setAttribute("type","radio");p.setAttribute("value","portrait");var E=document.createElement("input");E.setAttribute("name",d);E.setAttribute("type","radio");E.setAttribute("value","landscape");var N=document.createElement("select");N.style.marginBottom="8px";N.style.borderRadius="4px";N.style.border="1px solid rgb(160, 160, 160)";N.style.width="206px";
+var R=document.createElement("div");R.style.marginLeft="4px";R.style.width="210px";R.style.height="24px";p.style.marginRight="6px";R.appendChild(p);d=document.createElement("span");d.style.maxWidth="100px";mxUtils.write(d,mxResources.get("portrait"));R.appendChild(d);E.style.marginLeft="10px";E.style.marginRight="6px";R.appendChild(E);var G=document.createElement("span");G.style.width="100px";mxUtils.write(G,mxResources.get("landscape"));R.appendChild(G);var M=document.createElement("div");M.style.marginLeft=
+"4px";M.style.width="210px";M.style.height="24px";var Q=document.createElement("input");Q.setAttribute("size","7");Q.style.textAlign="right";M.appendChild(Q);mxUtils.write(M," in x ");var e=document.createElement("input");e.setAttribute("size","7");e.style.textAlign="right";M.appendChild(e);mxUtils.write(M," in");R.style.display="none";M.style.display="none";for(var f={},k=PageSetupDialog.getFormats(),z=0;z<k.length;z++){var t=k[z];f[t.key]=t;var B=document.createElement("option");B.setAttribute("value",
+t.key);mxUtils.write(B,t.title);N.appendChild(B)}var I=!1;D();b.appendChild(N);mxUtils.br(b);b.appendChild(R);b.appendChild(M);var O=g,J=function(y,ia){y=f[N.value];null!=y.format?(Q.value=y.format.width/100,e.value=y.format.height/100,M.style.display="none",R.style.display=""):(R.style.display="none",M.style.display="");y=parseFloat(Q.value);if(isNaN(y)||0>=y)Q.value=g.width/100;y=parseFloat(e.value);if(isNaN(y)||0>=y)e.value=g.height/100;y=new mxRectangle(0,0,Math.floor(100*parseFloat(Q.value)),
+Math.floor(100*parseFloat(e.value)));"custom"!=N.value&&E.checked&&(y=new mxRectangle(0,0,y.height,y.width));ia&&I||y.width==O.width&&y.height==O.height||(O=y,null!=l&&l(O))};mxEvent.addListener(d,"click",function(y){p.checked=!0;J(y);mxEvent.consume(y)});mxEvent.addListener(G,"click",function(y){E.checked=!0;J(y);mxEvent.consume(y)});mxEvent.addListener(Q,"blur",J);mxEvent.addListener(Q,"click",J);mxEvent.addListener(e,"blur",J);mxEvent.addListener(e,"click",J);mxEvent.addListener(E,"change",J);
+mxEvent.addListener(p,"change",J);mxEvent.addListener(N,"change",function(y){I="custom"==N.value;J(y,!0)});J();return{set:function(y){g=y;D(null,null,!0)},get:function(){return O},widthInput:Q,heightInput:e}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",
format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},
{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]};
-var FilenameDialog=function(b,e,k,m,C,p,F,L,P,d,f,g,x){P=null!=P?P:!0;var y=document.createElement("table"),t=document.createElement("tbody");y.style.position="absolute";y.style.top="30px";y.style.left="20px";var G=document.createElement("tr");var D=document.createElement("td");D.style.textOverflow="ellipsis";D.style.textAlign="right";D.style.maxWidth=(x?x+15:100)+"px";D.style.fontSize="10pt";D.style.width=(x?x:84)+"px";mxUtils.write(D,(C||mxResources.get("filename"))+":");G.appendChild(D);var I=
-document.createElement("input");I.setAttribute("value",e||"");I.style.marginLeft="4px";I.style.width=null!=g?g+"px":"180px";var H=mxUtils.button(k,function(){if(null==p||p(I.value))P&&b.hideDialog(),m(I.value)});H.className="geBtn gePrimaryBtn";this.init=function(){if(null!=C||null==F)if(I.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?I.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var S=y.parentNode;if(null!=S){var T=null;mxEvent.addListener(S,"dragleave",
-function(M){null!=T&&(T.style.backgroundColor="",T=null);M.stopPropagation();M.preventDefault()});mxEvent.addListener(S,"dragover",mxUtils.bind(this,function(M){null==T&&(!mxClient.IS_IE||10<document.documentMode)&&(T=I,T.style.backgroundColor="#ebf2f9");M.stopPropagation();M.preventDefault()}));mxEvent.addListener(S,"drop",mxUtils.bind(this,function(M){null!=T&&(T.style.backgroundColor="",T=null);0<=mxUtils.indexOf(M.dataTransfer.types,"text/uri-list")&&(I.value=decodeURIComponent(M.dataTransfer.getData("text/uri-list")),
-H.click());M.stopPropagation();M.preventDefault()}))}}};D=document.createElement("td");D.style.whiteSpace="nowrap";D.appendChild(I);G.appendChild(D);if(null!=C||null==F)t.appendChild(G),null!=f&&(D.appendChild(FilenameDialog.createTypeHint(b,I,f)),null!=b.editor.diagramFileTypes&&(G=document.createElement("tr"),D=document.createElement("td"),D.style.textOverflow="ellipsis",D.style.textAlign="right",D.style.maxWidth="100px",D.style.fontSize="10pt",D.style.width="84px",mxUtils.write(D,mxResources.get("type")+
-":"),G.appendChild(D),D=document.createElement("td"),D.style.whiteSpace="nowrap",G.appendChild(D),e=FilenameDialog.createFileTypes(b,I,b.editor.diagramFileTypes),e.style.marginLeft="4px",e.style.width="198px",D.appendChild(e),I.style.width=null!=g?g-40+"px":"190px",G.appendChild(D),t.appendChild(G)));null!=F&&(G=document.createElement("tr"),D=document.createElement("td"),D.colSpan=2,D.appendChild(F),G.appendChild(D),t.appendChild(G));G=document.createElement("tr");D=document.createElement("td");D.colSpan=
-2;D.style.paddingTop=null!=f?"12px":"20px";D.style.whiteSpace="nowrap";D.setAttribute("align","right");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d()});f.className="geBtn";b.editor.cancelFirst&&D.appendChild(f);null!=L&&(g=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(L)}),g.className="geBtn",D.appendChild(g));mxEvent.addListener(I,"keypress",function(S){13==S.keyCode&&H.click()});D.appendChild(H);b.editor.cancelFirst||D.appendChild(f);
-G.appendChild(D);t.appendChild(G);y.appendChild(t);this.container=y};FilenameDialog.filenameHelpLink=null;
-FilenameDialog.createTypeHint=function(b,e,k){var m=document.createElement("img");m.style.backgroundPosition="center bottom";m.style.backgroundRepeat="no-repeat";m.style.margin="2px 0 0 4px";m.style.verticalAlign="top";m.style.cursor="pointer";m.style.height="16px";m.style.width="16px";mxUtils.setOpacity(m,70);var C=function(){m.setAttribute("src",Editor.helpImage);m.setAttribute("title",mxResources.get("help"));for(var p=0;p<k.length;p++)if(0<k[p].ext.length&&e.value.toLowerCase().substring(e.value.length-
-k[p].ext.length-1)=="."+k[p].ext){m.setAttribute("title",mxResources.get(k[p].title));break}};mxEvent.addListener(e,"keyup",C);mxEvent.addListener(e,"change",C);mxEvent.addListener(m,"click",function(p){var F=m.getAttribute("title");m.getAttribute("src")==Editor.helpImage?b.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=F&&b.showError(null,F,mxResources.get("help"),function(){b.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);mxEvent.consume(p)});
-C();return m};
-FilenameDialog.createFileTypes=function(b,e,k){var m=document.createElement("select");for(b=0;b<k.length;b++){var C=document.createElement("option");C.setAttribute("value",b);mxUtils.write(C,mxResources.get(k[b].description)+" (."+k[b].extension+")");m.appendChild(C)}mxEvent.addListener(m,"change",function(p){p=k[m.value].extension;var F=e.value.lastIndexOf(".drawio.");F=0<F?F:e.value.lastIndexOf(".");"drawio"!=p&&(p="drawio."+p);e.value=0<F?e.value.substring(0,F+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 F=0,L=0;L<k.length;L++){var P=k[L].extension,d=null;"drawio"!=P&&(d=P,P=".drawio."+P);if(p.substring(p.length-P.length-1)=="."+P||null!=d&&p.substring(p.length-d.length-1)=="."+d){F=L;break}}m.value=F};mxEvent.addListener(e,"change",b);mxEvent.addListener(e,"keyup",b);b();return m};
-var WrapperWindow=function(b,e,k,m,C,p,F){var L=b.createSidebarContainer();F(L);this.window=new mxWindow(e,L,k,m,C,p,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);b.installResizeHandler(this,!0);mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(P){null==P&&(P=window.event);return null!=P&&b.isSelectionAllowed(P)}))};
-(function(){mxGraphView.prototype.validateBackgroundPage=function(){var F=this.graph;if(null!=F.container&&!F.transparentBackground){if(F.pageVisible){var L=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var P=F.container.firstChild;null!=P&&P.nodeType!=mxConstants.NODETYPE_ELEMENT;)P=P.nextSibling;null!=P&&(this.backgroundPageShape=this.createBackgroundPageShape(L),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
-this.backgroundPageShape.init(F.container),P.style.position="absolute",F.container.insertBefore(this.backgroundPageShape.node,P),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(d){F.dblClick(d)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(d){F.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(d))}),mxUtils.bind(this,function(d){null!=
-F.tooltipHandler&&F.tooltipHandler.isHideOnHover()&&F.tooltipHandler.hide();F.isMouseDown&&!mxEvent.isConsumed(d)&&F.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(d))}),mxUtils.bind(this,function(d){F.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(d))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=L,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};
-mxGraphView.prototype.validateBackgroundStyles=function(){var F=this.graph,L=null==F.background||F.background==mxConstants.NONE?F.defaultPageBackgroundColor:F.background,P=null!=L&&this.gridColor!=L.toLowerCase()?this.gridColor:"#ffffff",d="none",f="";if(F.isGridEnabled()||F.gridVisible){f=10;mxClient.IS_SVG?(d=unescape(encodeURIComponent(this.createSvgGrid(P))),d=window.btoa?btoa(d):Base64.encode(d,!0),d="url(data:image/svg+xml;base64,"+d+")",f=F.gridSize*this.scale*this.gridSteps):d="url("+this.gridImage+
-")";var g=P=0;null!=F.view.backgroundPageShape&&(g=this.getBackgroundPageBounds(),P=1+g.x,g=1+g.y);f=-Math.round(f-mxUtils.mod(this.translate.x*this.scale-P,f))+"px "+-Math.round(f-mxUtils.mod(this.translate.y*this.scale-g,f))+"px"}P=F.view.canvas;null!=P.ownerSVGElement&&(P=P.ownerSVGElement);null!=F.view.backgroundPageShape?(F.view.backgroundPageShape.node.style.backgroundPosition=f,F.view.backgroundPageShape.node.style.backgroundImage=d,F.view.backgroundPageShape.node.style.backgroundColor=L,F.view.backgroundPageShape.node.style.borderColor=
-F.defaultPageBorderColor,F.container.className="geDiagramContainer geDiagramBackdrop",P.style.backgroundImage="none",P.style.backgroundColor=""):(F.container.className="geDiagramContainer",P.style.backgroundPosition=f,P.style.backgroundColor=L,P.style.backgroundImage=d)};mxGraphView.prototype.createSvgGrid=function(F){for(var L=this.graph.gridSize*this.scale;L<this.minGridSize;)L*=2;for(var P=this.gridSteps*L,d=[],f=1;f<this.gridSteps;f++){var g=f*L;d.push("M 0 "+g+" L "+P+" "+g+" M "+g+" 0 L "+g+
-" "+P)}return'<svg width="'+P+'" height="'+P+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+P+'" height="'+P+'" patternUnits="userSpaceOnUse"><path d="'+d.join(" ")+'" fill="none" stroke="'+F+'" opacity="0.2" stroke-width="1"/><path d="M '+P+" 0 L 0 0 0 "+P+'" fill="none" stroke="'+F+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(F,L){b.apply(this,arguments);
-if(null!=this.shiftPreview1){var P=this.view.canvas;null!=P.ownerSVGElement&&(P=P.ownerSVGElement);var d=this.gridSize*this.view.scale*this.view.gridSteps;d=-Math.round(d-mxUtils.mod(this.view.translate.x*this.view.scale+F,d))+"px "+-Math.round(d-mxUtils.mod(this.view.translate.y*this.view.scale+L,d))+"px";P.style.backgroundPosition=d}};mxGraph.prototype.updatePageBreaks=function(F,L,P){var d=this.view.scale,f=this.view.translate,g=this.pageFormat,x=d*this.pageScale,y=this.view.getBackgroundPageBounds();
-L=y.width;P=y.height;var t=new mxRectangle(d*f.x,d*f.y,g.width*x,g.height*x),G=(F=F&&Math.min(t.width,t.height)>this.minPageBreakDist)?Math.ceil(P/t.height)-1:0,D=F?Math.ceil(L/t.width)-1:0,I=y.x+L,H=y.y+P;null==this.horizontalPageBreaks&&0<G&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<D&&(this.verticalPageBreaks=[]);F=mxUtils.bind(this,function(S){if(null!=S){for(var T=S==this.horizontalPageBreaks?G:D,M=0;M<=T;M++){var fa=S==this.horizontalPageBreaks?[new mxPoint(Math.round(y.x),
-Math.round(y.y+(M+1)*t.height)),new mxPoint(Math.round(I),Math.round(y.y+(M+1)*t.height))]:[new mxPoint(Math.round(y.x+(M+1)*t.width),Math.round(y.y)),new mxPoint(Math.round(y.x+(M+1)*t.width),Math.round(H))];null!=S[M]?(S[M].points=fa,S[M].redraw()):(fa=new mxPolyline(fa,this.pageBreakColor),fa.dialect=this.dialect,fa.isDashed=this.pageBreakDashed,fa.pointerEvents=!1,fa.init(this.view.backgroundPane),fa.redraw(),S[M]=fa)}for(M=T;M<S.length;M++)S[M].destroy();S.splice(T,S.length-T)}});F(this.horizontalPageBreaks);
-F(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(F,L,P){for(var d=0;d<L.length;d++){if(this.graph.isTableCell(L[d])||this.graph.isTableRow(L[d]))return!1;if(this.graph.getModel().isVertex(L[d])){var f=this.graph.getCellGeometry(L[d]);if(null!=f&&f.relative)return!1}}return e.apply(this,arguments)};var k=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var F=
-k.apply(this,arguments);F.intersects=mxUtils.bind(this,function(L,P){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(F,arguments)});return F};mxGraphView.prototype.createBackgroundPageShape=function(F){return new mxRectangleShape(F,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var F=this.getGraphBounds(),L=0<F.width?F.x/this.scale-this.translate.x:0,P=0<F.height?F.y/this.scale-this.translate.y:0,d=this.graph.pageFormat,
-f=this.graph.pageScale,g=d.width*f;d=d.height*f;f=Math.floor(Math.min(0,L)/g);var x=Math.floor(Math.min(0,P)/d);return new mxRectangle(this.scale*(this.translate.x+f*g),this.scale*(this.translate.y+x*d),this.scale*(Math.ceil(Math.max(1,L+F.width/this.scale)/g)-f)*g,this.scale*(Math.ceil(Math.max(1,P+F.height/this.scale)/d)-x)*d)};var m=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(F,L){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=F+"px",this.view.backgroundPageShape.node.style.marginTop=L+"px")};var C=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(F,L,P,d,f,g){var x=C.apply(this,arguments);null==g||g||mxEvent.addListener(x,"mousedown",function(y){mxEvent.consume(y)});return x};var p=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
-function(F,L,P){var d=this.graph.model.getParent(F);if(L){var f=this.graph.model.isEdge(F)?null:this.graph.getCellGeometry(F);f=!this.graph.model.isEdge(d)&&!this.graph.isSiblingSelected(F)&&(null!=f&&f.relative||!this.graph.isContainer(d)||this.graph.isPart(F))}else if(f=p.apply(this,arguments),this.graph.isTableCell(F)||this.graph.isTableRow(F))f=d,this.graph.isTable(f)||(f=this.graph.model.getParent(f)),f=!this.graph.selectionCellsHandler.isHandled(f)||this.graph.isCellSelected(f)&&this.graph.isToggleEvent(P.getEvent())||
-this.graph.isCellSelected(F)&&!this.graph.isToggleEvent(P.getEvent())||this.graph.isTableCell(F)&&this.graph.isCellSelected(d);return f};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(F){F=F.getCell();for(var L=this.graph.getModel(),P=L.getParent(F),d=this.graph.view.getState(P),f=this.graph.isCellSelected(F);null!=d&&(L.isVertex(P)||L.isEdge(P));){var g=this.graph.isCellSelected(P);f=f||g;if(g||!f&&(this.graph.isTableCell(F)||this.graph.isTableRow(F)))F=P;P=L.getParent(P)}return F}})();EditorUi=function(b,e,k){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var m=this.editor.graph;m.lightbox=k;var C=m.getGraphBounds;m.getGraphBounds=function(){var V=C.apply(this,arguments),ha=this.backgroundImage;if(null!=ha&&null!=ha.width&&null!=ha.height){var X=this.view.translate,ia=this.view.scale;V=mxRectangle.fromRectangle(V);V.add(new mxRectangle((X.x+ha.x)*ia,(X.y+ha.y)*ia,ha.width*ia,ha.height*ia))}return V};m.useCssTransforms&&
-(this.lazyZoomDelay=0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.selectionStateListener=mxUtils.bind(this,function(V,ha){this.clearSelectionState()});m.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);
-m.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);m.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);m.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);m.getView().addListener("unitChanged",this.selectionStateListener);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,m.isEnabled=function(){return!1},m.panningHandler.isForcePanningEvent=function(V){return!mxEvent.isPopupTrigger(V.getEvent())});this.actions=new Actions(this);this.menus=
-this.createMenus();if(!m.standalone){var p="rounded shadow glass dashed dashPattern labelBackgroundColor labelBorderColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents strokeColor strokeWidth".split(" "),F="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "),
-L="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" "),P=!1,d=!1;this.setDefaultStyle=function(V){try{m.getModel().isEdge(V)?d=!1:P=!1;var ha=m.getCellStyle(V,!1),X=[],ia=[],q;for(q in ha)X.push(ha[q]),ia.push(q);m.getModel().isEdge(V)?m.currentEdgeStyle={}:m.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ia,"values",X,"cells",[V]));m.getModel().isEdge(V)?d=!0:P=!0}catch(E){this.handleError(E)}};this.clearDefaultStyle=
-function(){m.currentEdgeStyle=mxUtils.clone(m.defaultEdgeStyle);m.currentVertexStyle=mxUtils.clone(m.defaultVertexStyle);P=d=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var f=["fontFamily","fontSource","fontSize","fontColor"];for(e=0;e<f.length;e++)0>mxUtils.indexOf(p,f[e])&&p.push(f[e]);var g="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),x=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing",
-"targetPerimeterSpacing"],["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(e=0;e<x.length;e++)for(k=0;k<x[e].length;k++)p.push(x[e][k]);for(e=0;e<F.length;e++)0>mxUtils.indexOf(p,F[e])&&p.push(F[e]);var y=function(V,ha,X,ia,q,E,Q){ia=null!=ia?ia:m.currentVertexStyle;q=null!=q?q:m.currentEdgeStyle;E=null!=E?E:!0;X=null!=X?X:m.getModel();if(Q){Q=[];for(var Y=0;Y<V.length;Y++)Q=Q.concat(X.getDescendants(V[Y]));V=Q}X.beginUpdate();try{for(Y=0;Y<V.length;Y++){var R=V[Y];if(ha)var Z=
-["fontSize","fontFamily","fontColor"];else{var da=X.getStyle(R),qa=null!=da?da.split(";"):[];Z=p.slice();for(var va=0;va<qa.length;va++){var ja=qa[va],sa=ja.indexOf("=");if(0<=sa){var ya=ja.substring(0,sa),Aa=mxUtils.indexOf(Z,ya);0<=Aa&&Z.splice(Aa,1);for(Q=0;Q<x.length;Q++){var Ea=x[Q];if(0<=mxUtils.indexOf(Ea,ya))for(var za=0;za<Ea.length;za++){var Ia=mxUtils.indexOf(Z,Ea[za]);0<=Ia&&Z.splice(Ia,1)}}}}}var Ca=X.isEdge(R);Q=Ca?q:ia;var Sa=X.getStyle(R);for(va=0;va<Z.length;va++){ya=Z[va];var Pa=
-Q[ya];null!=Pa&&"edgeStyle"!=ya&&("shape"!=ya||Ca)&&(!Ca||E||0>mxUtils.indexOf(L,ya))&&(Sa=mxUtils.setStyle(Sa,ya,Pa))}Editor.simpleLabels&&(Sa=mxUtils.setStyle(mxUtils.setStyle(Sa,"html",null),"whiteSpace",null));X.setStyle(R,Sa)}}finally{X.endUpdate()}return V};m.addListener("cellsInserted",function(V,ha){y(ha.getProperty("cells"),null,null,null,null,!0,!0)});m.addListener("textInserted",function(V,ha){y(ha.getProperty("cells"),!0)});this.insertHandler=y;this.createDivs();this.createUi();this.refresh();
-var t=mxUtils.bind(this,function(V){null==V&&(V=window.event);return m.isEditing()||null!=V&&this.isSelectionAllowed(V)});this.container==document.body&&(this.menubarContainer.onselectstart=t,this.menubarContainer.onmousedown=t,this.toolbarContainer.onselectstart=t,this.toolbarContainer.onmousedown=t,this.diagramContainer.onselectstart=t,this.diagramContainer.onmousedown=t,this.sidebarContainer.onselectstart=t,this.sidebarContainer.onmousedown=t,this.formatContainer.onselectstart=t,this.formatContainer.onmousedown=
-t,this.footerContainer.onselectstart=t,this.footerContainer.onmousedown=t,null!=this.tabContainer&&(this.tabContainer.onselectstart=t));!this.editor.chromeless||this.editor.editable?(e=function(V){if(null!=V){var ha=mxEvent.getSource(V);if("A"==ha.nodeName)for(;null!=ha;){if("geHint"==ha.className)return!0;ha=ha.parentNode}}return t(V)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",e):this.diagramContainer.oncontextmenu=
-e):m.panningHandler.usePopupTrigger=!1;m.init(this.diagramContainer);mxClient.IS_SVG&&null!=m.view.getDrawPane()&&(e=m.view.getDrawPane().ownerSVGElement,null!=e&&(e.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=m.graphHandler){var G=m.graphHandler.start;m.graphHandler.start=function(){null!=oa.hoverIcons&&oa.hoverIcons.reset();G.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(V){var ha=mxUtils.getOffset(this.diagramContainer);
-0<mxEvent.getClientX(V)-ha.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(V)-ha.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var D=!1,I=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(V,ha){return D||I.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(V){32!=V.which||m.isEditing()?mxEvent.isConsumed(V)||27!=V.keyCode||this.hideDialog(null,
-!0):(D=!0,this.hoverIcons.reset(),m.container.style.cursor="move",m.isEditing()||mxEvent.getSource(V)!=m.container||mxEvent.consume(V))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(V){m.container.style.cursor="";D=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var H=m.panningHandler.isForcePanningEvent;m.panningHandler.isForcePanningEvent=function(V){return H.apply(this,arguments)||D||mxEvent.isMouseEvent(V.getEvent())&&(this.usePopupTrigger||
-!mxEvent.isPopupTrigger(V.getEvent()))&&(!mxEvent.isControlDown(V.getEvent())&&mxEvent.isRightMouseButton(V.getEvent())||mxEvent.isMiddleMouseButton(V.getEvent()))};var S=m.cellEditor.isStopEditingEvent;m.cellEditor.isStopEditingEvent=function(V){return S.apply(this,arguments)||13==V.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(V)||mxClient.IS_MAC&&mxEvent.isMetaDown(V)||mxClient.IS_SF&&mxEvent.isShiftDown(V))};var T=m.isZoomWheelEvent;m.isZoomWheelEvent=function(){return D||T.apply(this,arguments)};
-var M=!1,fa=null,la=null,ra=null,ba=mxUtils.bind(this,function(){if(null!=this.toolbar&&M!=m.cellEditor.isContentEditing()){for(var V=this.toolbar.container.firstChild,ha=[];null!=V;){var X=V.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,V)&&(V.parentNode.removeChild(V),ha.push(V));V=X}V=this.toolbar.fontMenu;X=this.toolbar.sizeMenu;if(null==ra)this.toolbar.createTextToolbar();else{for(var ia=0;ia<ra.length;ia++)this.toolbar.container.appendChild(ra[ia]);this.toolbar.fontMenu=fa;this.toolbar.sizeMenu=
-la}M=m.cellEditor.isContentEditing();fa=V;la=X;ra=ha}}),oa=this,na=m.cellEditor.startEditing;m.cellEditor.startEditing=function(){na.apply(this,arguments);ba();if(m.cellEditor.isContentEditing()){var V=!1,ha=function(){V||(V=!0,window.setTimeout(function(){var X=m.getSelectedEditingElement();null!=X&&(X=mxUtils.getCurrentStyle(X),null!=X&&null!=oa.toolbar&&(oa.toolbar.setFontName(Graph.stripQuotes(X.fontFamily)),oa.toolbar.setFontSize(parseInt(X.fontSize))));V=!1},0))};mxEvent.addListener(m.cellEditor.textarea,
-"input",ha);mxEvent.addListener(m.cellEditor.textarea,"touchend",ha);mxEvent.addListener(m.cellEditor.textarea,"mouseup",ha);mxEvent.addListener(m.cellEditor.textarea,"keyup",ha);ha()}};var N=m.cellEditor.stopEditing;m.cellEditor.stopEditing=function(V,ha){try{N.apply(this,arguments),ba()}catch(X){oa.handleError(X)}};m.container.setAttribute("tabindex","0");m.container.style.cursor="default";if(window.self===window.top&&null!=m.container.parentNode)try{m.container.focus()}catch(V){}var aa=m.fireMouseEvent;
-m.fireMouseEvent=function(V,ha,X){V==mxEvent.MOUSE_DOWN&&this.container.focus();aa.apply(this,arguments)};m.popupMenuHandler.autoExpand=!0;null!=this.menus&&(m.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(V,ha,X){this.menus.createPopupMenu(V,ha,X)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(V){m.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};m.connectionHandler.addListener(mxEvent.CONNECT,
-function(V,ha){var X=[ha.getProperty("cell")];ha.getProperty("terminalInserted")&&(X.push(ha.getProperty("terminal")),window.setTimeout(function(){null!=oa.hoverIcons&&oa.hoverIcons.update(m.view.getState(X[X.length-1]))},0));y(X)});this.addListener("styleChanged",mxUtils.bind(this,function(V,ha){var X=ha.getProperty("cells"),ia=V=!1;if(0<X.length)for(var q=0;q<X.length&&(V=m.getModel().isVertex(X[q])||V,!(ia=m.getModel().isEdge(X[q])||ia)||!V);q++);else ia=V=!0;V=V&&!P;ia=ia&&!d;X=ha.getProperty("keys");
-ha=ha.getProperty("values");for(q=0;q<X.length;q++){var E=0<=mxUtils.indexOf(f,X[q]);if("strokeColor"!=X[q]||null!=ha[q]&&"none"!=ha[q])if(0<=mxUtils.indexOf(F,X[q]))ia||0<=mxUtils.indexOf(g,X[q])?null==ha[q]?delete m.currentEdgeStyle[X[q]]:m.currentEdgeStyle[X[q]]=ha[q]:V&&0<=mxUtils.indexOf(p,X[q])&&(null==ha[q]?delete m.currentVertexStyle[X[q]]:m.currentVertexStyle[X[q]]=ha[q]);else if(0<=mxUtils.indexOf(p,X[q])){if(V||E)null==ha[q]?delete m.currentVertexStyle[X[q]]:m.currentVertexStyle[X[q]]=
-ha[q];if(ia||E||0<=mxUtils.indexOf(g,X[q]))null==ha[q]?delete m.currentEdgeStyle[X[q]]:m.currentEdgeStyle[X[q]]=ha[q]}}null!=this.toolbar&&(this.toolbar.setFontName(m.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(m.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==m.currentEdgeStyle.edgeStyle&&"1"==m.currentEdgeStyle.curved?
-"geSprite geSprite-curved":"straight"==m.currentEdgeStyle.edgeStyle||"none"==m.currentEdgeStyle.edgeStyle||null==m.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==m.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==m.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==m.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==m.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==m.currentEdgeStyle.elbow?
-"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==m.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==m.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==m.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var V=m.currentVertexStyle.fontFamily||"Helvetica",
-ha=String(m.currentVertexStyle.fontSize||"12"),X=m.getView().getState(m.getSelectionCell());null!=X&&(V=X.style[mxConstants.STYLE_FONTFAMILY]||V,ha=X.style[mxConstants.STYLE_FONTSIZE]||ha,10<V.length&&(V=V.substring(0,8)+"..."));this.toolbar.setFontName(V);this.toolbar.setFontSize(ha)}),m.getSelectionModel().addListener(mxEvent.CHANGE,b),m.getModel().addListener(mxEvent.CHANGE,b));m.addListener(mxEvent.CELLS_ADDED,function(V,ha){V=ha.getProperty("cells");ha=ha.getProperty("parent");null!=ha&&m.getModel().isLayer(ha)&&
-!m.isCellVisible(ha)&&null!=V&&0<V.length&&m.getModel().setVisible(ha,!0)});this.gestureHandler=mxUtils.bind(this,function(V){null!=this.currentMenu&&mxEvent.getSource(V)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=
-mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){m.view.validateBackground()}));
-this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){m.view.validateBackground()}));m.addListener("gridSizeChanged",mxUtils.bind(this,function(){m.isGridEnabled()&&m.view.validateBackground()}));this.editor.resetGraph()}this.init();m.standalone||this.open()};EditorUi.compactUi=!0;
-EditorUi.parsePng=function(b,e,k){function m(L,P){var d=p;p+=P;return L.substring(d,p)}function C(L){L=m(L,4);return L.charCodeAt(3)+(L.charCodeAt(2)<<8)+(L.charCodeAt(1)<<16)+(L.charCodeAt(0)<<24)}var p=0;if(m(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(m(b,4),"IHDR"!=m(b,4))null!=k&&k();else{m(b,17);do{k=C(b);var F=m(b,4);if(null!=e&&e(p-8,F,k))break;value=m(b,k);m(b,4);if("IEND"==F)break}while(k)}};mxUtils.extend(EditorUi,mxEventSource);
+var FilenameDialog=function(b,d,g,l,D,p,E,N,R,G,M,Q,e){R=null!=R?R:!0;var f=document.createElement("table"),k=document.createElement("tbody");f.style.position="absolute";f.style.top="30px";f.style.left="20px";var z=document.createElement("tr");var t=document.createElement("td");t.style.textOverflow="ellipsis";t.style.textAlign="right";t.style.maxWidth=(e?e+15:100)+"px";t.style.fontSize="10pt";t.style.width=(e?e:84)+"px";mxUtils.write(t,(D||mxResources.get("filename"))+":");z.appendChild(t);var B=
+document.createElement("input");B.setAttribute("value",d||"");B.style.marginLeft="4px";B.style.width=null!=Q?Q+"px":"180px";var I=mxUtils.button(g,function(){if(null==p||p(B.value))R&&b.hideDialog(),l(B.value)});I.className="geBtn gePrimaryBtn";this.init=function(){if(null!=D||null==E)if(B.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?B.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var O=f.parentNode;if(null!=O){var J=null;mxEvent.addListener(O,"dragleave",
+function(y){null!=J&&(J.style.backgroundColor="",J=null);y.stopPropagation();y.preventDefault()});mxEvent.addListener(O,"dragover",mxUtils.bind(this,function(y){null==J&&(!mxClient.IS_IE||10<document.documentMode)&&(J=B,J.style.backgroundColor="#ebf2f9");y.stopPropagation();y.preventDefault()}));mxEvent.addListener(O,"drop",mxUtils.bind(this,function(y){null!=J&&(J.style.backgroundColor="",J=null);0<=mxUtils.indexOf(y.dataTransfer.types,"text/uri-list")&&(B.value=decodeURIComponent(y.dataTransfer.getData("text/uri-list")),
+I.click());y.stopPropagation();y.preventDefault()}))}}};t=document.createElement("td");t.style.whiteSpace="nowrap";t.appendChild(B);z.appendChild(t);if(null!=D||null==E)k.appendChild(z),null!=M&&(t.appendChild(FilenameDialog.createTypeHint(b,B,M)),null!=b.editor.diagramFileTypes&&(z=document.createElement("tr"),t=document.createElement("td"),t.style.textOverflow="ellipsis",t.style.textAlign="right",t.style.maxWidth="100px",t.style.fontSize="10pt",t.style.width="84px",mxUtils.write(t,mxResources.get("type")+
+":"),z.appendChild(t),t=document.createElement("td"),t.style.whiteSpace="nowrap",z.appendChild(t),d=FilenameDialog.createFileTypes(b,B,b.editor.diagramFileTypes),d.style.marginLeft="4px",d.style.width="198px",t.appendChild(d),B.style.width=null!=Q?Q-40+"px":"190px",z.appendChild(t),k.appendChild(z)));null!=E&&(z=document.createElement("tr"),t=document.createElement("td"),t.colSpan=2,t.appendChild(E),z.appendChild(t),k.appendChild(z));z=document.createElement("tr");t=document.createElement("td");t.colSpan=
+2;t.style.paddingTop=null!=M?"12px":"20px";t.style.whiteSpace="nowrap";t.setAttribute("align","right");M=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=G&&G()});M.className="geBtn";b.editor.cancelFirst&&t.appendChild(M);null!=N&&(Q=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(N)}),Q.className="geBtn",t.appendChild(Q));mxEvent.addListener(B,"keypress",function(O){13==O.keyCode&&I.click()});t.appendChild(I);b.editor.cancelFirst||t.appendChild(M);
+z.appendChild(t);k.appendChild(z);f.appendChild(k);this.container=f};FilenameDialog.filenameHelpLink=null;
+FilenameDialog.createTypeHint=function(b,d,g){var l=document.createElement("img");l.style.backgroundPosition="center bottom";l.style.backgroundRepeat="no-repeat";l.style.margin="2px 0 0 4px";l.style.verticalAlign="top";l.style.cursor="pointer";l.style.height="16px";l.style.width="16px";mxUtils.setOpacity(l,70);var D=function(){l.setAttribute("src",Editor.helpImage);l.setAttribute("title",mxResources.get("help"));for(var p=0;p<g.length;p++)if(0<g[p].ext.length&&d.value.toLowerCase().substring(d.value.length-
+g[p].ext.length-1)=="."+g[p].ext){l.setAttribute("title",mxResources.get(g[p].title));break}};mxEvent.addListener(d,"keyup",D);mxEvent.addListener(d,"change",D);mxEvent.addListener(l,"click",function(p){var E=l.getAttribute("title");l.getAttribute("src")==Editor.helpImage?b.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=E&&b.showError(null,E,mxResources.get("help"),function(){b.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);mxEvent.consume(p)});
+D();return l};
+FilenameDialog.createFileTypes=function(b,d,g){var l=document.createElement("select");for(b=0;b<g.length;b++){var D=document.createElement("option");D.setAttribute("value",b);mxUtils.write(D,mxResources.get(g[b].description)+" (."+g[b].extension+")");l.appendChild(D)}mxEvent.addListener(l,"change",function(p){p=g[l.value].extension;var E=d.value.lastIndexOf(".drawio.");E=0<E?E:d.value.lastIndexOf(".");"drawio"!=p&&(p="drawio."+p);d.value=0<E?d.value.substring(0,E+1)+p:d.value+"."+p;"createEvent"in
+document?(p=document.createEvent("HTMLEvents"),p.initEvent("change",!1,!0),d.dispatchEvent(p)):d.fireEvent("onchange")});b=function(p){p=d.value.toLowerCase();for(var E=0,N=0;N<g.length;N++){var R=g[N].extension,G=null;"drawio"!=R&&(G=R,R=".drawio."+R);if(p.substring(p.length-R.length-1)=="."+R||null!=G&&p.substring(p.length-G.length-1)=="."+G){E=N;break}}l.value=E};mxEvent.addListener(d,"change",b);mxEvent.addListener(d,"keyup",b);b();return l};
+var WrapperWindow=function(b,d,g,l,D,p,E){var N=b.createSidebarContainer();E(N);this.window=new mxWindow(d,N,g,l,D,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(R){null==R&&(R=window.event);return null!=R&&b.isSelectionAllowed(R)}))};
+(function(){mxGraphView.prototype.validateBackgroundPage=function(){var E=this.graph;if(null!=E.container&&!E.transparentBackground){if(E.pageVisible){var N=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var R=E.container.firstChild;null!=R&&R.nodeType!=mxConstants.NODETYPE_ELEMENT;)R=R.nextSibling;null!=R&&(this.backgroundPageShape=this.createBackgroundPageShape(N),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
+this.backgroundPageShape.init(E.container),R.style.position="absolute",E.container.insertBefore(this.backgroundPageShape.node,R),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(G){E.dblClick(G)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(G){E.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(G))}),mxUtils.bind(this,function(G){null!=
+E.tooltipHandler&&E.tooltipHandler.isHideOnHover()&&E.tooltipHandler.hide();E.isMouseDown&&!mxEvent.isConsumed(G)&&E.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(G))}),mxUtils.bind(this,function(G){E.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(G))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=N,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};
+mxGraphView.prototype.validateBackgroundStyles=function(){var E=this.graph,N=null==E.background||E.background==mxConstants.NONE?E.defaultPageBackgroundColor:E.background,R=null!=N&&this.gridColor!=N.toLowerCase()?this.gridColor:"#ffffff",G="none",M="";if(E.isGridEnabled()||E.gridVisible){M=10;mxClient.IS_SVG?(G=unescape(encodeURIComponent(this.createSvgGrid(R))),G=window.btoa?btoa(G):Base64.encode(G,!0),G="url(data:image/svg+xml;base64,"+G+")",M=E.gridSize*this.scale*this.gridSteps):G="url("+this.gridImage+
+")";var Q=R=0;null!=E.view.backgroundPageShape&&(Q=this.getBackgroundPageBounds(),R=1+Q.x,Q=1+Q.y);M=-Math.round(M-mxUtils.mod(this.translate.x*this.scale-R,M))+"px "+-Math.round(M-mxUtils.mod(this.translate.y*this.scale-Q,M))+"px"}R=E.view.canvas;null!=R.ownerSVGElement&&(R=R.ownerSVGElement);null!=E.view.backgroundPageShape?(E.view.backgroundPageShape.node.style.backgroundPosition=M,E.view.backgroundPageShape.node.style.backgroundImage=G,E.view.backgroundPageShape.node.style.backgroundColor=N,E.view.backgroundPageShape.node.style.borderColor=
+E.defaultPageBorderColor,E.container.className="geDiagramContainer geDiagramBackdrop",R.style.backgroundImage="none",R.style.backgroundColor="",Editor.isDarkMode()||"sketch"!=Editor.currentTheme?E.container.style.backgroundColor="":E.container.style.backgroundColor=E.sketchBackgroundColor):(E.container.className="geDiagramContainer",R.style.backgroundPosition=M,R.style.backgroundImage=G,null!=E.background&&E.background!=mxConstants.NONE||Editor.isDarkMode()||"sketch"!=Editor.currentTheme?R.style.backgroundColor=
+N:R.style.backgroundColor=E.sketchBackgroundColor)};mxGraphView.prototype.createSvgGrid=function(E){for(var N=this.graph.gridSize*this.scale;N<this.minGridSize;)N*=2;for(var R=this.gridSteps*N,G=[],M=1;M<this.gridSteps;M++){var Q=M*N;G.push("M 0 "+Q+" L "+R+" "+Q+" M "+Q+" 0 L "+Q+" "+R)}return'<svg width="'+R+'" height="'+R+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+R+'" height="'+R+'" patternUnits="userSpaceOnUse"><path d="'+G.join(" ")+'" fill="none" stroke="'+E+'" opacity="0.2" stroke-width="1"/><path d="M '+
+R+" 0 L 0 0 0 "+R+'" fill="none" stroke="'+E+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(E,N){b.apply(this,arguments);if(null!=this.shiftPreview1){var R=this.view.canvas;null!=R.ownerSVGElement&&(R=R.ownerSVGElement);var G=this.gridSize*this.view.scale*this.view.gridSteps;G=-Math.round(G-mxUtils.mod(this.view.translate.x*this.view.scale+E,G))+"px "+-Math.round(G-mxUtils.mod(this.view.translate.y*
+this.view.scale+N,G))+"px";R.style.backgroundPosition=G}};mxGraph.prototype.updatePageBreaks=function(E,N,R){var G=this.view.scale,M=this.view.translate,Q=this.pageFormat,e=G*this.pageScale,f=this.view.getBackgroundPageBounds();N=f.width;R=f.height;var k=new mxRectangle(G*M.x,G*M.y,Q.width*e,Q.height*e),z=(E=E&&Math.min(k.width,k.height)>this.minPageBreakDist)?Math.ceil(R/k.height)-1:0,t=E?Math.ceil(N/k.width)-1:0,B=f.x+N,I=f.y+R;null==this.horizontalPageBreaks&&0<z&&(this.horizontalPageBreaks=[]);
+null==this.verticalPageBreaks&&0<t&&(this.verticalPageBreaks=[]);E=mxUtils.bind(this,function(O){if(null!=O){for(var J=O==this.horizontalPageBreaks?z:t,y=0;y<=J;y++){var ia=O==this.horizontalPageBreaks?[new mxPoint(Math.round(f.x),Math.round(f.y+(y+1)*k.height)),new mxPoint(Math.round(B),Math.round(f.y+(y+1)*k.height))]:[new mxPoint(Math.round(f.x+(y+1)*k.width),Math.round(f.y)),new mxPoint(Math.round(f.x+(y+1)*k.width),Math.round(I))];null!=O[y]?(O[y].points=ia,O[y].redraw()):(ia=new mxPolyline(ia,
+this.pageBreakColor),ia.dialect=this.dialect,ia.isDashed=this.pageBreakDashed,ia.pointerEvents=!1,ia.init(this.view.backgroundPane),ia.redraw(),O[y]=ia)}for(y=J;y<O.length;y++)O[y].destroy();O.splice(J,O.length-J)}});E(this.horizontalPageBreaks);E(this.verticalPageBreaks)};var d=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(E,N,R){for(var G=0;G<N.length;G++){if(this.graph.isTableCell(N[G])||this.graph.isTableRow(N[G]))return!1;if(this.graph.getModel().isVertex(N[G])){var M=
+this.graph.getCellGeometry(N[G]);if(null!=M&&M.relative)return!1}}return d.apply(this,arguments)};var g=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var E=g.apply(this,arguments);E.intersects=mxUtils.bind(this,function(N,R){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(E,arguments)});return E};mxGraphView.prototype.createBackgroundPageShape=function(E){return new mxRectangleShape(E,"#ffffff",this.graph.defaultPageBorderColor)};
+mxGraphView.prototype.getBackgroundPageBounds=function(){var E=this.getGraphBounds(),N=0<E.width?E.x/this.scale-this.translate.x:0,R=0<E.height?E.y/this.scale-this.translate.y:0,G=this.graph.pageFormat,M=this.graph.pageScale,Q=G.width*M;G=G.height*M;M=Math.floor(Math.min(0,N)/Q);var e=Math.floor(Math.min(0,R)/G);return new mxRectangle(this.scale*(this.translate.x+M*Q),this.scale*(this.translate.y+e*G),this.scale*(Math.ceil(Math.max(1,N+E.width/this.scale)/Q)-M)*Q,this.scale*(Math.ceil(Math.max(1,
+R+E.height/this.scale)/G)-e)*G)};var l=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(E,N){l.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=E+"px",this.view.backgroundPageShape.node.style.marginTop=N+"px")};var D=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(E,N,R,G,M,Q){var e=D.apply(this,
+arguments);null==Q||Q||mxEvent.addListener(e,"mousedown",function(f){mxEvent.consume(f)});return e};var p=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=function(E,N,R){var G=this.graph.model.getParent(E);if(N){var M=this.graph.model.isEdge(E)?null:this.graph.getCellGeometry(E);M=!this.graph.model.isEdge(G)&&!this.graph.isSiblingSelected(E)&&(null!=M&&M.relative||!this.graph.isContainer(G)||this.graph.isPart(E))}else if(M=p.apply(this,arguments),
+this.graph.isTableCell(E)||this.graph.isTableRow(E))M=G,this.graph.isTable(M)||(M=this.graph.model.getParent(M)),M=!this.graph.selectionCellsHandler.isHandled(M)||this.graph.isCellSelected(M)&&this.graph.isToggleEvent(R.getEvent())||this.graph.isCellSelected(E)&&!this.graph.isToggleEvent(R.getEvent())||this.graph.isTableCell(E)&&this.graph.isCellSelected(G);return M};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(E){E=E.getCell();for(var N=this.graph.getModel(),R=N.getParent(E),G=this.graph.view.getState(R),
+M=this.graph.isCellSelected(E);null!=G&&(N.isVertex(R)||N.isEdge(R));){var Q=this.graph.isCellSelected(R);M=M||Q;if(Q||!M&&(this.graph.isTableCell(E)||this.graph.isTableRow(E)))E=R;R=N.getParent(R)}return E}})();EditorUi=function(b,d,g){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=d||document.body;var l=this.editor.graph;l.lightbox=g;var D=l.getGraphBounds;l.getGraphBounds=function(){var T=D.apply(this,arguments),Y=this.backgroundImage;if(null!=Y&&null!=Y.width&&null!=Y.height){var W=this.view.translate,ka=this.view.scale;T=mxRectangle.fromRectangle(T);T.add(new mxRectangle((W.x+Y.x)*ka,(W.y+Y.y)*ka,Y.width*ka,Y.height*ka))}return T};l.useCssTransforms&&(this.lazyZoomDelay=
+0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.selectionStateListener=mxUtils.bind(this,function(T,Y){this.clearSelectionState()});l.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);
+l.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);l.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);l.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);l.getView().addListener("unitChanged",this.selectionStateListener);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,l.isEnabled=function(){return!1},l.panningHandler.isForcePanningEvent=function(T){return!mxEvent.isPopupTrigger(T.getEvent())});this.actions=new Actions(this);this.menus=
+this.createMenus();if(!l.standalone){var p="rounded shadow glass dashed dashPattern labelBackgroundColor labelBorderColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents strokeColor strokeWidth".split(" "),E="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "),
+N="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" "),R=!1,G=!1;this.setDefaultStyle=function(T){try{l.getModel().isEdge(T)?G=!1:R=!1;var Y=l.getCellStyle(T,!1),W=[],ka=[],q;for(q in Y)W.push(Y[q]),ka.push(q);l.getModel().isEdge(T)?l.currentEdgeStyle={}:l.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ka,"values",W,"cells",[T]));l.getModel().isEdge(T)?G=!0:R=!0}catch(F){this.handleError(F)}};this.clearDefaultStyle=
+function(){l.currentEdgeStyle=mxUtils.clone(l.defaultEdgeStyle);l.currentVertexStyle=mxUtils.clone(l.defaultVertexStyle);R=G=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var M=["fontFamily","fontSource","fontSize","fontColor"];for(d=0;d<M.length;d++)0>mxUtils.indexOf(p,M[d])&&p.push(M[d]);var Q="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),e=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing",
+"targetPerimeterSpacing"],["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(d=0;d<e.length;d++)for(g=0;g<e[d].length;g++)p.push(e[d][g]);for(d=0;d<E.length;d++)0>mxUtils.indexOf(p,E[d])&&p.push(E[d]);var f=function(T,Y,W,ka,q,F,S){ka=null!=ka?ka:l.currentVertexStyle;q=null!=q?q:l.currentEdgeStyle;F=null!=F?F:!0;W=null!=W?W:l.getModel();if(S){S=[];for(var ba=0;ba<T.length;ba++)S=S.concat(W.getDescendants(T[ba]));T=S}W.beginUpdate();try{for(ba=0;ba<T.length;ba++){var U=T[ba];
+if(Y)var ca=["fontSize","fontFamily","fontColor"];else{var ea=W.getStyle(U),na=null!=ea?ea.split(";"):[];ca=p.slice();for(var ra=0;ra<na.length;ra++){var ya=na[ra],va=ya.indexOf("=");if(0<=va){var Da=ya.substring(0,va),pa=mxUtils.indexOf(ca,Da);0<=pa&&ca.splice(pa,1);for(S=0;S<e.length;S++){var Aa=e[S];if(0<=mxUtils.indexOf(Aa,Da))for(var xa=0;xa<Aa.length;xa++){var Ma=mxUtils.indexOf(ca,Aa[xa]);0<=Ma&&ca.splice(Ma,1)}}}}}var Oa=W.isEdge(U);S=Oa?q:ka;var Na=W.getStyle(U);for(ra=0;ra<ca.length;ra++){Da=
+ca[ra];var La=S[Da];null!=La&&"edgeStyle"!=Da&&("shape"!=Da||Oa)&&(!Oa||F||0>mxUtils.indexOf(N,Da))&&(Na=mxUtils.setStyle(Na,Da,La))}Editor.simpleLabels&&(Na=mxUtils.setStyle(mxUtils.setStyle(Na,"html",null),"whiteSpace",null));W.setStyle(U,Na)}}finally{W.endUpdate()}return T};l.addListener("cellsInserted",function(T,Y){f(Y.getProperty("cells"),null,null,null,null,!0,!0)});l.addListener("textInserted",function(T,Y){f(Y.getProperty("cells"),!0)});this.insertHandler=f;this.createDivs();this.createUi();
+this.refresh();var k=mxUtils.bind(this,function(T){null==T&&(T=window.event);return l.isEditing()||null!=T&&this.isSelectionAllowed(T)});this.container==document.body&&(this.menubarContainer.onselectstart=k,this.menubarContainer.onmousedown=k,this.toolbarContainer.onselectstart=k,this.toolbarContainer.onmousedown=k,this.diagramContainer.onselectstart=k,this.diagramContainer.onmousedown=k,this.sidebarContainer.onselectstart=k,this.sidebarContainer.onmousedown=k,this.formatContainer.onselectstart=k,
+this.formatContainer.onmousedown=k,this.footerContainer.onselectstart=k,this.footerContainer.onmousedown=k,null!=this.tabContainer&&(this.tabContainer.onselectstart=k));!this.editor.chromeless||this.editor.editable?(d=function(T){if(null!=T){var Y=mxEvent.getSource(T);if("A"==Y.nodeName)for(;null!=Y;){if("geHint"==Y.className)return!0;Y=Y.parentNode}}return k(T)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",
+d):this.diagramContainer.oncontextmenu=d):l.panningHandler.usePopupTrigger=!1;l.init(this.diagramContainer);mxClient.IS_SVG&&null!=l.view.getDrawPane()&&(d=l.view.getDrawPane().ownerSVGElement,null!=d&&(d.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=l.graphHandler){var z=l.graphHandler.start;l.graphHandler.start=function(){null!=qa.hoverIcons&&qa.hoverIcons.reset();z.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(T){var Y=
+mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(T)-Y.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(T)-Y.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var t=!1,B=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(T,Y){return t||B.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(T){32!=T.which||l.isEditing()?mxEvent.isConsumed(T)||
+27!=T.keyCode||this.hideDialog(null,!0):(t=!0,this.hoverIcons.reset(),l.container.style.cursor="move",l.isEditing()||mxEvent.getSource(T)!=l.container||mxEvent.consume(T))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(T){l.container.style.cursor="";t=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var I=l.panningHandler.isForcePanningEvent;l.panningHandler.isForcePanningEvent=function(T){return I.apply(this,arguments)||t||mxEvent.isMouseEvent(T.getEvent())&&
+(this.usePopupTrigger||!mxEvent.isPopupTrigger(T.getEvent()))&&(!mxEvent.isControlDown(T.getEvent())&&mxEvent.isRightMouseButton(T.getEvent())||mxEvent.isMiddleMouseButton(T.getEvent()))};var O=l.cellEditor.isStopEditingEvent;l.cellEditor.isStopEditingEvent=function(T){return O.apply(this,arguments)||13==T.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(T)||mxClient.IS_MAC&&mxEvent.isMetaDown(T)||mxClient.IS_SF&&mxEvent.isShiftDown(T))};var J=l.isZoomWheelEvent;l.isZoomWheelEvent=function(){return t||
+J.apply(this,arguments)};var y=!1,ia=null,da=null,ja=null,aa=mxUtils.bind(this,function(){if(null!=this.toolbar&&y!=l.cellEditor.isContentEditing()){for(var T=this.toolbar.container.firstChild,Y=[];null!=T;){var W=T.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,T)&&(T.parentNode.removeChild(T),Y.push(T));T=W}T=this.toolbar.fontMenu;W=this.toolbar.sizeMenu;if(null==ja)this.toolbar.createTextToolbar();else{for(var ka=0;ka<ja.length;ka++)this.toolbar.container.appendChild(ja[ka]);this.toolbar.fontMenu=
+ia;this.toolbar.sizeMenu=da}y=l.cellEditor.isContentEditing();ia=T;da=W;ja=Y}}),qa=this,sa=l.cellEditor.startEditing;l.cellEditor.startEditing=function(){sa.apply(this,arguments);aa();if(l.cellEditor.isContentEditing()){var T=!1,Y=function(){T||(T=!0,window.setTimeout(function(){var W=l.getSelectedEditingElement();null!=W&&(W=mxUtils.getCurrentStyle(W),null!=W&&null!=qa.toolbar&&(qa.toolbar.setFontName(Graph.stripQuotes(W.fontFamily)),qa.toolbar.setFontSize(parseInt(W.fontSize))));T=!1},0))};mxEvent.addListener(l.cellEditor.textarea,
+"input",Y);mxEvent.addListener(l.cellEditor.textarea,"touchend",Y);mxEvent.addListener(l.cellEditor.textarea,"mouseup",Y);mxEvent.addListener(l.cellEditor.textarea,"keyup",Y);Y()}};var L=l.cellEditor.stopEditing;l.cellEditor.stopEditing=function(T,Y){try{L.apply(this,arguments),aa()}catch(W){qa.handleError(W)}};l.container.setAttribute("tabindex","0");l.container.style.cursor="default";if(window.self===window.top&&null!=l.container.parentNode)try{l.container.focus()}catch(T){}var V=l.fireMouseEvent;
+l.fireMouseEvent=function(T,Y,W){T==mxEvent.MOUSE_DOWN&&this.container.focus();V.apply(this,arguments)};l.popupMenuHandler.autoExpand=!0;null!=this.menus&&(l.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(T,Y,W){this.menus.createPopupMenu(T,Y,W)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(T){l.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};l.connectionHandler.addListener(mxEvent.CONNECT,function(T,
+Y){var W=[Y.getProperty("cell")];Y.getProperty("terminalInserted")&&(W.push(Y.getProperty("terminal")),window.setTimeout(function(){null!=qa.hoverIcons&&qa.hoverIcons.update(l.view.getState(W[W.length-1]))},0));f(W)});this.addListener("styleChanged",mxUtils.bind(this,function(T,Y){var W=Y.getProperty("cells"),ka=T=!1;if(0<W.length)for(var q=0;q<W.length&&(T=l.getModel().isVertex(W[q])||T,!(ka=l.getModel().isEdge(W[q])||ka)||!T);q++);else ka=T=!0;T=T&&!R;ka=ka&&!G;W=Y.getProperty("keys");Y=Y.getProperty("values");
+for(q=0;q<W.length;q++){var F=0<=mxUtils.indexOf(M,W[q]);if("strokeColor"!=W[q]||null!=Y[q]&&"none"!=Y[q])if(0<=mxUtils.indexOf(E,W[q]))ka||0<=mxUtils.indexOf(Q,W[q])?null==Y[q]?delete l.currentEdgeStyle[W[q]]:l.currentEdgeStyle[W[q]]=Y[q]:T&&0<=mxUtils.indexOf(p,W[q])&&(null==Y[q]?delete l.currentVertexStyle[W[q]]:l.currentVertexStyle[W[q]]=Y[q]);else if(0<=mxUtils.indexOf(p,W[q])){if(T||F)null==Y[q]?delete l.currentVertexStyle[W[q]]:l.currentVertexStyle[W[q]]=Y[q];if(ka||F||0<=mxUtils.indexOf(Q,
+W[q]))null==Y[q]?delete l.currentEdgeStyle[W[q]]:l.currentEdgeStyle[W[q]]=Y[q]}}null!=this.toolbar&&(this.toolbar.setFontName(l.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(l.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==l.currentEdgeStyle.edgeStyle&&"1"==l.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==
+l.currentEdgeStyle.edgeStyle||"none"==l.currentEdgeStyle.edgeStyle||null==l.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==l.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==l.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==l.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==l.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==l.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):
+"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==l.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==l.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==l.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var T=l.currentVertexStyle.fontFamily||"Helvetica",Y=String(l.currentVertexStyle.fontSize||
+"12"),W=l.getView().getState(l.getSelectionCell());null!=W&&(T=W.style[mxConstants.STYLE_FONTFAMILY]||T,Y=W.style[mxConstants.STYLE_FONTSIZE]||Y,10<T.length&&(T=T.substring(0,8)+"..."));this.toolbar.setFontName(T);this.toolbar.setFontSize(Y)}),l.getSelectionModel().addListener(mxEvent.CHANGE,b),l.getModel().addListener(mxEvent.CHANGE,b));l.addListener(mxEvent.CELLS_ADDED,function(T,Y){T=Y.getProperty("cells");Y=Y.getProperty("parent");null!=Y&&l.getModel().isLayer(Y)&&!l.isCellVisible(Y)&&null!=T&&
+0<T.length&&l.getModel().setVisible(Y,!0)});this.gestureHandler=mxUtils.bind(this,function(T){null!=this.currentMenu&&mxEvent.getSource(T)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});
+mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){l.view.validateBackground()}));this.addListener("backgroundColorChanged",
+mxUtils.bind(this,function(){l.view.validateBackground()}));l.addListener("gridSizeChanged",mxUtils.bind(this,function(){l.isGridEnabled()&&l.view.validateBackground()}));this.editor.resetGraph()}this.init();l.standalone||this.open()};EditorUi.compactUi=!0;
+EditorUi.parsePng=function(b,d,g){function l(N,R){var G=p;p+=R;return N.substring(G,p)}function D(N){N=l(N,4);return N.charCodeAt(3)+(N.charCodeAt(2)<<8)+(N.charCodeAt(1)<<16)+(N.charCodeAt(0)<<24)}var p=0;if(l(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=g&&g();else if(l(b,4),"IHDR"!=l(b,4))null!=g&&g();else{l(b,17);do{g=D(b);var E=l(b,4);if(null!=d&&d(p-8,E,g))break;value=l(b,g);l(b,4);if("IEND"==E)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.sidebarFooterHeight=34;EditorUi.prototype.hsplitPosition=640>=screen.width?118:"large"!=urlParams["sidebar-entries"]?212:240;EditorUi.prototype.allowAnimation=!0;EditorUi.prototype.lightboxMaxFitScale=2;
EditorUi.prototype.lightboxVerticalDivider=4;EditorUi.prototype.hsplitClickEnabled=!1;
-EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"!=urlParams["shape-picker"]&&this.installShapePicker();mxEvent.addListener(b.container,"scroll",mxUtils.bind(this,function(){b.tooltipHandler.hide();null!=b.connectionHandler&&null!=b.connectionHandler.constraintHandler&&b.connectionHandler.constraintHandler.reset()}));b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){b.tooltipHandler.hide();var m=b.getRubberband();null!=m&&m.cancel()}));mxEvent.addListener(b.container,
-"keydown",mxUtils.bind(this,function(m){this.onKeyDown(m)}));mxEvent.addListener(b.container,"keypress",mxUtils.bind(this,function(m){this.onKeyPress(m)}));this.addUndoListener();this.addBeforeUnloadListener();b.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));b.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));var e=b.setDefaultParent,k=this;this.editor.graph.setDefaultParent=function(){e.apply(this,
-arguments);k.updateActionStates()};b.editLink=k.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};EditorUi.prototype.clearSelectionState=function(){this.selectionState=null};EditorUi.prototype.getSelectionState=function(){null==this.selectionState&&(this.selectionState=this.createSelectionState());return this.selectionState};
-EditorUi.prototype.createSelectionState=function(){for(var b=this.editor.graph,e=b.getSelectionCells(),k=this.initSelectionState(),m=!0,C=0;C<e.length;C++){var p=b.getCurrentCellStyle(e[C]);"0"!=mxUtils.getValue(p,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(k,e[C],e,m),m=!1)}this.updateSelectionStateForTableCells(k);return k};
+EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"!=urlParams["shape-picker"]&&this.installShapePicker();mxEvent.addListener(b.container,"scroll",mxUtils.bind(this,function(){b.tooltipHandler.hide();null!=b.connectionHandler&&null!=b.connectionHandler.constraintHandler&&b.connectionHandler.constraintHandler.reset()}));b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){b.tooltipHandler.hide();var l=b.getRubberband();null!=l&&l.cancel()}));mxEvent.addListener(b.container,
+"keydown",mxUtils.bind(this,function(l){this.onKeyDown(l)}));mxEvent.addListener(b.container,"keypress",mxUtils.bind(this,function(l){this.onKeyPress(l)}));this.addUndoListener();this.addBeforeUnloadListener();b.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));b.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));var d=b.setDefaultParent,g=this;this.editor.graph.setDefaultParent=function(){d.apply(this,
+arguments);g.updateActionStates()};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,d=b.getSelectionCells(),g=this.initSelectionState(),l=!0,D=0;D<d.length;D++){var p=b.getCurrentCellStyle(d[D]);"0"!=mxUtils.getValue(p,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(g,d[D],d,l),l=!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,rounded:!0,autoSize:!1,image:!0,shadow:!0,lineJumps:!0,resizable:!0,table:!1,cell:!1,row:!1,movable:!0,rotatable:!0,stroke:!0,swimlane:!1,unlocked:this.editor.graph.isEnabled(),connections:!1}};
-EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){for(var e=mxUtils.sortCells(b.cells),k=this.editor.graph.model,m=k.getParent(e[0]),C=k.getParent(m),p=m.getIndex(e[0]),F=C.getIndex(m),L=null,P=1,d=1,f=0,g=F<C.getChildCount()-1?k.getChildAt(k.getChildAt(C,F+1),p):null;f<e.length-1;){var x=e[++f];null==g||g!=x||null!=L&&P!=L||(L=P,P=0,d++,m=k.getParent(g),g=F+d<C.getChildCount()?k.getChildAt(k.getChildAt(C,F+d),p):null);var y=this.editor.graph.view.getState(x);
-if(x==k.getChildAt(m,p+P)&&null!=y&&1==mxUtils.getValue(y.style,"colspan",1)&&1==mxUtils.getValue(y.style,"rowspan",1))P++;else break}f==d*P-1&&(b.mergeCell=e[0],b.colspan=P,b.rowspan=d)}};
-EditorUi.prototype.updateSelectionStateForCell=function(b,e,k,m){k=this.editor.graph;b.cells.push(e);if(k.getModel().isVertex(e)){b.connections=0<k.model.getEdgeCount(e);b.unlocked=b.unlocked&&!k.isCellLocked(e);b.resizable=b.resizable&&k.isCellResizable(e);b.rotatable=b.rotatable&&k.isCellRotatable(e);b.movable=b.movable&&k.isCellMovable(e)&&!k.isTableRow(e)&&!k.isTableCell(e);b.swimlane=b.swimlane||k.isSwimlane(e);b.table=b.table||k.isTable(e);b.cell=b.cell||k.isTableCell(e);b.row=b.row||k.isTableRow(e);
-b.vertices.push(e);var C=k.getCellGeometry(e);if(null!=C&&(0<C.width?null==b.width?b.width=C.width:b.width!=C.width&&(b.width=""):b.containsLabel=!0,0<C.height?null==b.height?b.height=C.height:b.height!=C.height&&(b.height=""):b.containsLabel=!0,!C.relative||null!=C.offset)){var p=C.relative?C.offset.x:C.x;C=C.relative?C.offset.y:C.y;null==b.x?b.x=p:b.x!=p&&(b.x="");null==b.y?b.y=C:b.y!=C&&(b.y="")}}else k.getModel().isEdge(e)&&(b.edges.push(e),b.connections=!0,b.resizable=!1,b.rotatable=!1,b.movable=
-!1);e=k.view.getState(e);null!=e&&(b.autoSize=b.autoSize||k.isAutoSizeState(e),b.glass=b.glass&&k.isGlassState(e),b.rounded=b.rounded&&k.isRoundedState(e),b.lineJumps=b.lineJumps&&k.isLineJumpState(e),b.image=b.image&&k.isImageState(e),b.shadow=b.shadow&&k.isShadowState(e),b.fill=b.fill&&k.isFillState(e),b.stroke=b.stroke&&k.isStrokeState(e),p=mxUtils.getValue(e.style,mxConstants.STYLE_SHAPE,null),b.containsImage=b.containsImage||"image"==p,k.mergeStyle(e.style,b.style,m))};
-EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,e=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(P,d){"mouseDown"==d.getProperty("eventName")&&e.hideShapePicker()}));var k=mxUtils.bind(this,function(){e.hideShapePicker(!0)});b.addListener("wheel",k);b.addListener(mxEvent.ESCAPE,k);b.view.addListener(mxEvent.SCALE,k);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,k);b.getSelectionModel().addListener(mxEvent.CHANGE,k);var m=b.popupMenuHandler.isMenuShowing;
-b.popupMenuHandler.isMenuShowing=function(){return m.apply(this,arguments)||null!=e.shapePicker};var C=b.dblClick;b.dblClick=function(P,d){if(this.isEnabled())if(null!=d||null==e.sidebar||mxEvent.isShiftDown(P)||b.isCellLocked(b.getDefaultParent()))C.apply(this,arguments);else{var f=mxUtils.convertPoint(this.container,mxEvent.getClientX(P),mxEvent.getClientY(P));mxEvent.consume(P);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(f.x,f.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
-k);var p=this.hoverIcons.drag;this.hoverIcons.drag=function(){e.hideShapePicker();p.apply(this,arguments)};var F=this.hoverIcons.execute;this.hoverIcons.execute=function(P,d,f){var g=f.getEvent();this.graph.isCloneEvent(g)||mxEvent.isShiftDown(g)?F.apply(this,arguments):this.graph.connectVertex(P.cell,d,this.graph.defaultEdgeLength,g,null,null,mxUtils.bind(this,function(x,y,t){var G=b.getCompositeParent(P.cell);x=b.getCellGeometry(G);for(f.consume();null!=G&&b.model.isVertex(G)&&null!=x&&x.relative;)cell=
-G,G=b.model.getParent(cell),x=b.getCellGeometry(G);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(f.getGraphX(),f.getGraphY(),G,mxUtils.bind(this,function(D){t(D);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(D))}),d)}),30)}),mxUtils.bind(this,function(x){this.graph.selectCellsForConnectVertex(x,g,this)}))};var L=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(P,d){null!=L&&window.clearTimeout(L);L=window.setTimeout(mxUtils.bind(this,function(){var f=
-d.getProperty("arrow"),g=d.getProperty("direction"),x=d.getProperty("event");f=f.getBoundingClientRect();var y=mxUtils.getOffset(b.container),t=b.container.scrollLeft+f.x-y.x;y=b.container.scrollTop+f.y-y.y;var G=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),D=e.showShapePicker(t,y,G,mxUtils.bind(this,function(I){null!=I&&b.connectVertex(G,g,b.defaultEdgeLength,x,!0,!0,function(H,S,T){T(I);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(I))},
-function(H){b.selectCellsForConnectVertex(H)},x,this.hoverIcons)}),g,!0);this.centerShapePicker(D,f,t,y,g);mxUtils.setOpacity(D,30);mxEvent.addListener(D,"mouseenter",function(){mxUtils.setOpacity(D,100)});mxEvent.addListener(D,"mouseleave",function(){e.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(P,d){null!=L&&window.clearTimeout(L)}))}};
-EditorUi.prototype.centerShapePicker=function(b,e,k,m,C){if(C==mxConstants.DIRECTION_EAST||C==mxConstants.DIRECTION_WEST)b.style.width="40px";var p=b.getBoundingClientRect();C==mxConstants.DIRECTION_NORTH?(k-=p.width/2-10,m-=p.height+6):C==mxConstants.DIRECTION_SOUTH?(k-=p.width/2-10,m+=e.height+6):C==mxConstants.DIRECTION_WEST?(k-=p.width+6,m-=p.height/2-10):C==mxConstants.DIRECTION_EAST&&(k+=e.width+6,m-=p.height/2-10);b.style.left=k+"px";b.style.top=m+"px"};
-EditorUi.prototype.showShapePicker=function(b,e,k,m,C,p){b=this.createShapePicker(b,e,k,m,C,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(k,p),p);null!=b&&(null==this.hoverIcons||p||this.hoverIcons.reset(),p=this.editor.graph,p.popupMenuHandler.hideMenu(),p.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=m,this.shapePicker=b);return b};
-EditorUi.prototype.createShapePicker=function(b,e,k,m,C,p,F,L){var P=null;if(null!=F&&0<F.length){var d=this,f=this.editor.graph;P=document.createElement("div");C=f.view.getState(k);var g=null==k||null!=C&&f.isTransparentState(C)?null:f.copyStyle(k);k=6>F.length?35*F.length:140;P.className="geToolbarContainer geSidebarContainer";P.style.cssText="position:absolute;left:"+b+"px;top:"+e+"px;width:"+k+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
-mxPopupMenu.prototype.zIndex+1+";";L||mxUtils.setPrefixedStyle(P.style,"transform","translate(-22px,-22px)");null!=f.background&&f.background!=mxConstants.NONE&&(P.style.backgroundColor=f.background);f.container.appendChild(P);k=mxUtils.bind(this,function(x){var y=document.createElement("a");y.className="geItem";y.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";P.appendChild(y);null!=g&&"1"!=urlParams.sketch?
-this.sidebar.graph.pasteStyle(g,[x]):d.insertHandler([x],""!=x.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([x],25,25,y,null,!0,!1,x.geometry.width,x.geometry.height);mxEvent.addListener(y,"click",function(){var t=f.cloneCell(x);if(null!=m)m(t);else{t.geometry.x=f.snap(Math.round(b/f.view.scale)-f.view.translate.x-x.geometry.width/2);t.geometry.y=f.snap(Math.round(e/f.view.scale)-f.view.translate.y-x.geometry.height/2);f.model.beginUpdate();try{f.addCell(t)}finally{f.model.endUpdate()}f.setSelectionCell(t);
-f.scrollCellToVisible(t);f.startEditingAtCell(t);null!=d.hoverIcons&&d.hoverIcons.update(f.view.getState(t))}null!=p&&p()})});for(C=0;C<(L?Math.min(F.length,4):F.length);C++)k(F[C]);F=P.offsetTop+P.clientHeight-(f.container.scrollTop+f.container.offsetHeight);0<F&&(P.style.top=Math.max(f.container.scrollTop+22,e-F)+"px");F=P.offsetLeft+P.clientWidth-(f.container.scrollLeft+f.container.offsetWidth);0<F&&(P.style.left=Math.max(f.container.scrollLeft+22,b-F)+"px")}return P};
-EditorUi.prototype.getCellsForShapePicker=function(b,e){e=mxUtils.bind(this,function(k,m,C,p){return this.editor.graph.createVertex(null,null,p||"",0,0,m||120,C||60,k,!1)});return[null!=b?this.editor.graph.cloneCell(b):e("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;",40,20,"Text"),e("whiteSpace=wrap;html=1;"),e("ellipse;whiteSpace=wrap;html=1;"),e("rhombus;whiteSpace=wrap;html=1;",80,80),e("rounded=1;whiteSpace=wrap;html=1;"),e("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),
-e("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60),e("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),e("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),e("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),e("triangle;whiteSpace=wrap;html=1;",60,80),e("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",120,80),e("shape=tape;whiteSpace=wrap;html=1;",120,100),e("ellipse;shape=cloud;whiteSpace=wrap;html=1;",
-120,80),e("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;",80,60),e("shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",40,40)]};EditorUi.prototype.hideShapePicker=function(b){null!=this.shapePicker&&(this.shapePicker.parentNode.removeChild(this.shapePicker),this.shapePicker=null,b||null==this.shapePickerCallback||this.shapePickerCallback(),this.shapePickerCallback=null)};
-EditorUi.prototype.onKeyDown=function(b){var e=this.editor.graph;if(9==b.which&&e.isEnabled()&&!mxEvent.isControlDown(b)){if(e.isEditing())if(mxEvent.isAltDown(b))e.stopEditing(!1);else try{var k=e.cellEditor.isContentEditing()&&e.cellEditor.isTextSelected();if(window.getSelection&&e.cellEditor.isContentEditing()&&!k&&!mxClient.IS_IE&&!mxClient.IS_IE11){var m=window.getSelection(),C=0<m.rangeCount?m.getRangeAt(0).commonAncestorContainer:null;k=null!=C&&("LI"==C.nodeName||null!=C.parentNode&&"LI"==
-C.parentNode.nodeName)}k?document.execCommand(mxEvent.isShiftDown(b)?"outdent":"indent",!1,null):mxEvent.isShiftDown(b)?e.stopEditing(!1):e.cellEditor.insertTab(e.cellEditor.isContentEditing()?null:4)}catch(p){}else mxEvent.isAltDown(b)?e.selectParentCell():e.selectCell(!mxEvent.isShiftDown(b));mxEvent.consume(b)}};
-EditorUi.prototype.onKeyPress=function(b){var e=this.editor.graph;!this.isImmediateEditingEvent(b)||e.isEditing()||e.isSelectionEmpty()||0===b.which||27===b.which||mxEvent.isAltDown(b)||mxEvent.isControlDown(b)||mxEvent.isMetaDown(b)||(e.escape(),e.startEditing(),mxClient.IS_FF&&(e=e.cellEditor,null!=e.textarea&&(e.textarea.innerHTML=String.fromCharCode(b.which),b=document.createRange(),b.selectNodeContents(e.textarea),b.collapse(!1),e=window.getSelection(),e.removeAllRanges(),e.addRange(b))))};
+EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){for(var d=mxUtils.sortCells(b.cells),g=this.editor.graph.model,l=g.getParent(d[0]),D=g.getParent(l),p=l.getIndex(d[0]),E=D.getIndex(l),N=null,R=1,G=1,M=0,Q=E<D.getChildCount()-1?g.getChildAt(g.getChildAt(D,E+1),p):null;M<d.length-1;){var e=d[++M];null==Q||Q!=e||null!=N&&R!=N||(N=R,R=0,G++,l=g.getParent(Q),Q=E+G<D.getChildCount()?g.getChildAt(g.getChildAt(D,E+G),p):null);var f=this.editor.graph.view.getState(e);
+if(e==g.getChildAt(l,p+R)&&null!=f&&1==mxUtils.getValue(f.style,"colspan",1)&&1==mxUtils.getValue(f.style,"rowspan",1))R++;else break}M==G*R-1&&(b.mergeCell=d[0],b.colspan=R,b.rowspan=G)}};
+EditorUi.prototype.updateSelectionStateForCell=function(b,d,g,l){g=this.editor.graph;b.cells.push(d);if(g.getModel().isVertex(d)){b.connections=0<g.model.getEdgeCount(d);b.unlocked=b.unlocked&&!g.isCellLocked(d);b.resizable=b.resizable&&g.isCellResizable(d);b.rotatable=b.rotatable&&g.isCellRotatable(d);b.movable=b.movable&&g.isCellMovable(d)&&!g.isTableRow(d)&&!g.isTableCell(d);b.swimlane=b.swimlane||g.isSwimlane(d);b.table=b.table||g.isTable(d);b.cell=b.cell||g.isTableCell(d);b.row=b.row||g.isTableRow(d);
+b.vertices.push(d);var D=g.getCellGeometry(d);if(null!=D&&(0<D.width?null==b.width?b.width=D.width:b.width!=D.width&&(b.width=""):b.containsLabel=!0,0<D.height?null==b.height?b.height=D.height:b.height!=D.height&&(b.height=""):b.containsLabel=!0,!D.relative||null!=D.offset)){var p=D.relative?D.offset.x:D.x;D=D.relative?D.offset.y:D.y;null==b.x?b.x=p:b.x!=p&&(b.x="");null==b.y?b.y=D:b.y!=D&&(b.y="")}}else g.getModel().isEdge(d)&&(b.edges.push(d),b.connections=!0,b.resizable=!1,b.rotatable=!1,b.movable=
+!1);d=g.view.getState(d);null!=d&&(b.autoSize=b.autoSize||g.isAutoSizeState(d),b.glass=b.glass&&g.isGlassState(d),b.rounded=b.rounded&&g.isRoundedState(d),b.lineJumps=b.lineJumps&&g.isLineJumpState(d),b.image=b.image&&g.isImageState(d),b.shadow=b.shadow&&g.isShadowState(d),b.fill=b.fill&&g.isFillState(d),b.stroke=b.stroke&&g.isStrokeState(d),p=mxUtils.getValue(d.style,mxConstants.STYLE_SHAPE,null),b.containsImage=b.containsImage||"image"==p,g.mergeStyle(d.style,b.style,l))};
+EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,d=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(R,G){"mouseDown"==G.getProperty("eventName")&&d.hideShapePicker()}));var g=mxUtils.bind(this,function(){d.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 l=b.popupMenuHandler.isMenuShowing;
+b.popupMenuHandler.isMenuShowing=function(){return l.apply(this,arguments)||null!=d.shapePicker};var D=b.dblClick;b.dblClick=function(R,G){if(this.isEnabled())if(null!=G||null==d.sidebar||mxEvent.isShiftDown(R)||b.isCellLocked(b.getDefaultParent()))D.apply(this,arguments);else{var M=mxUtils.convertPoint(this.container,mxEvent.getClientX(R),mxEvent.getClientY(R));mxEvent.consume(R);window.setTimeout(mxUtils.bind(this,function(){d.showShapePicker(M.x,M.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
+g);var p=this.hoverIcons.drag;this.hoverIcons.drag=function(){d.hideShapePicker();p.apply(this,arguments)};var E=this.hoverIcons.execute;this.hoverIcons.execute=function(R,G,M){var Q=M.getEvent();this.graph.isCloneEvent(Q)||mxEvent.isShiftDown(Q)?E.apply(this,arguments):this.graph.connectVertex(R.cell,G,this.graph.defaultEdgeLength,Q,null,null,mxUtils.bind(this,function(e,f,k){var z=b.getCompositeParent(R.cell);e=b.getCellGeometry(z);for(M.consume();null!=z&&b.model.isVertex(z)&&null!=e&&e.relative;)cell=
+z,z=b.model.getParent(cell),e=b.getCellGeometry(z);window.setTimeout(mxUtils.bind(this,function(){d.showShapePicker(M.getGraphX(),M.getGraphY(),z,mxUtils.bind(this,function(t){k(t);null!=d.hoverIcons&&d.hoverIcons.update(b.view.getState(t))}),G)}),30)}),mxUtils.bind(this,function(e){this.graph.selectCellsForConnectVertex(e,Q,this)}))};var N=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(R,G){null!=N&&window.clearTimeout(N);N=window.setTimeout(mxUtils.bind(this,function(){var M=
+G.getProperty("arrow"),Q=G.getProperty("direction"),e=G.getProperty("event");M=M.getBoundingClientRect();var f=mxUtils.getOffset(b.container),k=b.container.scrollLeft+M.x-f.x;f=b.container.scrollTop+M.y-f.y;var z=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),t=d.showShapePicker(k,f,z,mxUtils.bind(this,function(B){null!=B&&b.connectVertex(z,Q,b.defaultEdgeLength,e,!0,!0,function(I,O,J){J(B);null!=d.hoverIcons&&d.hoverIcons.update(b.view.getState(B))},
+function(I){b.selectCellsForConnectVertex(I)},e,this.hoverIcons)}),Q,!0);this.centerShapePicker(t,M,k,f,Q);mxUtils.setOpacity(t,30);mxEvent.addListener(t,"mouseenter",function(){mxUtils.setOpacity(t,100)});mxEvent.addListener(t,"mouseleave",function(){d.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(R,G){null!=N&&window.clearTimeout(N)}))}};
+EditorUi.prototype.centerShapePicker=function(b,d,g,l,D){if(D==mxConstants.DIRECTION_EAST||D==mxConstants.DIRECTION_WEST)b.style.width="40px";var p=b.getBoundingClientRect();D==mxConstants.DIRECTION_NORTH?(g-=p.width/2-10,l-=p.height+6):D==mxConstants.DIRECTION_SOUTH?(g-=p.width/2-10,l+=d.height+6):D==mxConstants.DIRECTION_WEST?(g-=p.width+6,l-=p.height/2-10):D==mxConstants.DIRECTION_EAST&&(g+=d.width+6,l-=p.height/2-10);b.style.left=g+"px";b.style.top=l+"px"};
+EditorUi.prototype.showShapePicker=function(b,d,g,l,D,p){b=this.createShapePicker(b,d,g,l,D,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(g,p),p);null!=b&&(null==this.hoverIcons||p||this.hoverIcons.reset(),p=this.editor.graph,p.popupMenuHandler.hideMenu(),p.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=l,this.shapePicker=b);return b};
+EditorUi.prototype.createShapePicker=function(b,d,g,l,D,p,E,N){var R=null;if(null!=E&&0<E.length){var G=this,M=this.editor.graph;R=document.createElement("div");D=M.view.getState(g);var Q=null==g||null!=D&&M.isTransparentState(D)?null:M.copyStyle(g);g=6>E.length?35*E.length:140;R.className="geToolbarContainer geSidebarContainer";R.style.cssText="position:absolute;left:"+b+"px;top:"+d+"px;width:"+g+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
+mxPopupMenu.prototype.zIndex+1+";";N||mxUtils.setPrefixedStyle(R.style,"transform","translate(-22px,-22px)");null!=M.background&&M.background!=mxConstants.NONE&&(R.style.backgroundColor=M.background);M.container.appendChild(R);g=mxUtils.bind(this,function(e){var f=document.createElement("a");f.className="geItem";f.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";R.appendChild(f);null!=Q&&"1"!=urlParams.sketch?
+this.sidebar.graph.pasteStyle(Q,[e]):G.insertHandler([e],""!=e.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([e],25,25,f,null,!0,!1,e.geometry.width,e.geometry.height);mxEvent.addListener(f,"click",function(){var k=M.cloneCell(e);if(null!=l)l(k);else{k.geometry.x=M.snap(Math.round(b/M.view.scale)-M.view.translate.x-e.geometry.width/2);k.geometry.y=M.snap(Math.round(d/M.view.scale)-M.view.translate.y-e.geometry.height/2);M.model.beginUpdate();try{M.addCell(k)}finally{M.model.endUpdate()}M.setSelectionCell(k);
+M.scrollCellToVisible(k);M.startEditingAtCell(k);null!=G.hoverIcons&&G.hoverIcons.update(M.view.getState(k))}null!=p&&p()})});for(D=0;D<(N?Math.min(E.length,4):E.length);D++)g(E[D]);E=R.offsetTop+R.clientHeight-(M.container.scrollTop+M.container.offsetHeight);0<E&&(R.style.top=Math.max(M.container.scrollTop+22,d-E)+"px");E=R.offsetLeft+R.clientWidth-(M.container.scrollLeft+M.container.offsetWidth);0<E&&(R.style.left=Math.max(M.container.scrollLeft+22,b-E)+"px")}return R};
+EditorUi.prototype.getCellsForShapePicker=function(b,d){d=mxUtils.bind(this,function(g,l,D,p){return this.editor.graph.createVertex(null,null,p||"",0,0,l||120,D||60,g,!1)});return[null!=b?this.editor.graph.cloneCell(b):d("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;",40,20,"Text"),d("whiteSpace=wrap;html=1;"),d("ellipse;whiteSpace=wrap;html=1;"),d("rhombus;whiteSpace=wrap;html=1;",80,80),d("rounded=1;whiteSpace=wrap;html=1;"),d("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),
+d("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60),d("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),d("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),d("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),d("triangle;whiteSpace=wrap;html=1;",60,80),d("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",120,80),d("shape=tape;whiteSpace=wrap;html=1;",120,100),d("ellipse;shape=cloud;whiteSpace=wrap;html=1;",
+120,80),d("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;",80,60),d("shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",40,40)]};EditorUi.prototype.hideShapePicker=function(b){null!=this.shapePicker&&(this.shapePicker.parentNode.removeChild(this.shapePicker),this.shapePicker=null,b||null==this.shapePickerCallback||this.shapePickerCallback(),this.shapePickerCallback=null)};
+EditorUi.prototype.onKeyDown=function(b){var d=this.editor.graph;if(9==b.which&&d.isEnabled()&&!mxEvent.isControlDown(b)){if(d.isEditing())if(mxEvent.isAltDown(b))d.stopEditing(!1);else try{var g=d.cellEditor.isContentEditing()&&d.cellEditor.isTextSelected();if(window.getSelection&&d.cellEditor.isContentEditing()&&!g&&!mxClient.IS_IE&&!mxClient.IS_IE11){var l=window.getSelection(),D=0<l.rangeCount?l.getRangeAt(0).commonAncestorContainer:null;g=null!=D&&("LI"==D.nodeName||null!=D.parentNode&&"LI"==
+D.parentNode.nodeName)}g?document.execCommand(mxEvent.isShiftDown(b)?"outdent":"indent",!1,null):mxEvent.isShiftDown(b)?d.stopEditing(!1):d.cellEditor.insertTab(d.cellEditor.isContentEditing()?null:4)}catch(p){}else mxEvent.isAltDown(b)?d.selectParentCell():d.selectCell(!mxEvent.isShiftDown(b));mxEvent.consume(b)}};
+EditorUi.prototype.onKeyPress=function(b){var d=this.editor.graph;!this.isImmediateEditingEvent(b)||d.isEditing()||d.isSelectionEmpty()||0===b.which||27===b.which||mxEvent.isAltDown(b)||mxEvent.isControlDown(b)||mxEvent.isMetaDown(b)||(d.escape(),d.startEditing(),mxClient.IS_FF&&(d=d.cellEditor,null!=d.textarea&&(d.textarea.innerHTML=String.fromCharCode(b.which),b=document.createRange(),b.selectNodeContents(d.textarea),b.collapse(!1),d=window.getSelection(),d.removeAllRanges(),d.addRange(b))))};
EditorUi.prototype.isImmediateEditingEvent=function(b){return!0};
-EditorUi.prototype.updateCssForMarker=function(b,e,k,m,C){b.style.verticalAlign="top";b.style.height="21px";b.style.width="21px";b.innerText="";"flexArrow"==k?b.className=null!=m&&m!=mxConstants.NONE?"geSprite geSprite-"+e+"blocktrans":"geSprite geSprite-noarrow":(k=this.getImageForMarker(m,C),null!=k?(m=document.createElement("img"),m.className="geAdaptiveAsset",m.style.position="absolute",m.style.marginTop="0.5px",m.setAttribute("src",k),b.className="","end"==e&&mxUtils.setPrefixedStyle(m.style,
-"transform","scaleX(-1)"),b.appendChild(m)):(b.className="geSprite geSprite-noarrow",b.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),b.style.backgroundImage="none",b.style.verticalAlign="top",b.style.marginTop="4px",b.style.fontSize="10px",b.style.filter="none",b.style.color=this.defaultStrokeColor,b.nextSibling.style.marginTop="0px"))};
-EditorUi.prototype.getImageForMarker=function(b,e){var k=null;b==mxConstants.ARROW_CLASSIC?k="1"!=e?Format.classicMarkerImage.src:Format.classicFilledMarkerImage.src:b==mxConstants.ARROW_CLASSIC_THIN?k="1"!=e?Format.classicThinMarkerImage.src:Format.openThinFilledMarkerImage.src:b==mxConstants.ARROW_OPEN?k=Format.openFilledMarkerImage.src:b==mxConstants.ARROW_OPEN_THIN?k=Format.openThinFilledMarkerImage.src:b==mxConstants.ARROW_BLOCK?k="1"!=e?Format.blockMarkerImage.src:Format.blockFilledMarkerImage.src:
-b==mxConstants.ARROW_BLOCK_THIN?k="1"!=e?Format.blockThinMarkerImage.src:Format.blockThinFilledMarkerImage.src:b==mxConstants.ARROW_OVAL?k="1"!=e?Format.ovalMarkerImage.src:Format.ovalFilledMarkerImage.src:b==mxConstants.ARROW_DIAMOND?k="1"!=e?Format.diamondMarkerImage.src:Format.diamondFilledMarkerImage.src:b==mxConstants.ARROW_DIAMOND_THIN?k="1"!=e?Format.diamondThinMarkerImage.src:Format.diamondThinFilledMarkerImage.src:"doubleBlock"==b?k="1"!=e?Format.doubleBlockMarkerImage.src:Format.doubleBlockFilledMarkerImage.src:
-"box"==b?k=Format.boxMarkerImage.src:"halfCircle"==b?k=Format.halfCircleMarkerImage.src:"openAsync"==b?k=Format.openAsyncFilledMarkerImage.src:"async"==b?k="1"!=e?Format.asyncMarkerImage.src:Format.asyncFilledMarkerImage.src:"dash"==b?k=Format.dashMarkerImage.src:"baseDash"==b?k=Format.baseDashMarkerImage.src:"cross"==b?k=Format.crossMarkerImage.src:"circle"==b?k=Format.circleMarkerImage.src:"circlePlus"==b?k=Format.circlePlusMarkerImage.src:"ERone"==b?k=Format.EROneMarkerImage.src:"ERmandOne"==b?
-k=Format.ERmandOneMarkerImage.src:"ERmany"==b?k=Format.ERmanyMarkerImage.src:"ERoneToMany"==b?k=Format.ERoneToManyMarkerImage.src:"ERzeroToOne"==b?k=Format.ERzeroToOneMarkerImage.src:"ERzeroToMany"==b&&(k=Format.ERzeroToManyMarkerImage.src);return k};EditorUi.prototype.createMenus=function(){return null};
-EditorUi.prototype.updatePasteActionStates=function(){var b=this.editor.graph,e=this.actions.get("paste"),k=this.actions.get("pasteHere");e.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(!mxClient.IS_FF&&null!=navigator.clipboard||!mxClipboard.isEmpty())&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()));k.setEnabled(e.isEnabled())};
-EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipboard.cut=function(p){p.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):e.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(p){var F=null;if(p.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{F=F||p.getSelectionCells();F=p.getExportableCells(p.model.getTopmostCells(F));for(var L={},P=p.createCellLookup(F),d=p.cloneCells(F,null,L),f=new mxGraphModel,g=f.getChildAt(f.getRoot(),
-0),x=0;x<d.length;x++){f.add(g,d[x]);var y=p.view.getState(F[x]);if(null!=y){var t=p.getCellGeometry(d[x]);null!=t&&t.relative&&!f.isEdge(F[x])&&null==P[mxObjectIdentity.get(f.getParent(F[x]))]&&(t.offset=null,t.relative=!1,t.x=y.x/y.view.scale-y.view.translate.x,t.y=y.y/y.view.scale-y.view.translate.y)}}p.updateCustomLinks(p.createCellMapping(L,P),d);mxClipboard.insertCount=1;mxClipboard.setCells(d)}b.updatePasteActionStates();return F};var k=mxClipboard.paste;mxClipboard.paste=function(p){var F=
-null;p.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):F=k.apply(this,arguments);b.updatePasteActionStates();return F};var m=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){m.apply(this,arguments);b.updatePasteActionStates()};var C=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(p,F){C.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};
+EditorUi.prototype.updateCssForMarker=function(b,d,g,l,D){b.style.verticalAlign="top";b.style.height="21px";b.style.width="21px";b.innerText="";"flexArrow"==g?b.className=null!=l&&l!=mxConstants.NONE?"geSprite geSprite-"+d+"blocktrans":"geSprite geSprite-noarrow":(g=this.getImageForMarker(l,D),null!=g?(l=document.createElement("img"),l.className="geAdaptiveAsset",l.style.position="absolute",l.style.marginTop="0.5px",l.setAttribute("src",g),b.className="","end"==d&&mxUtils.setPrefixedStyle(l.style,
+"transform","scaleX(-1)"),b.appendChild(l)):(b.className="geSprite geSprite-noarrow",b.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),b.style.backgroundImage="none",b.style.verticalAlign="top",b.style.marginTop="4px",b.style.fontSize="10px",b.style.filter="none",b.style.color=this.defaultStrokeColor,b.nextSibling.style.marginTop="0px"))};
+EditorUi.prototype.getImageForMarker=function(b,d){var g=null;b==mxConstants.ARROW_CLASSIC?g="1"!=d?Format.classicMarkerImage.src:Format.classicFilledMarkerImage.src:b==mxConstants.ARROW_CLASSIC_THIN?g="1"!=d?Format.classicThinMarkerImage.src:Format.openThinFilledMarkerImage.src:b==mxConstants.ARROW_OPEN?g=Format.openFilledMarkerImage.src:b==mxConstants.ARROW_OPEN_THIN?g=Format.openThinFilledMarkerImage.src:b==mxConstants.ARROW_BLOCK?g="1"!=d?Format.blockMarkerImage.src:Format.blockFilledMarkerImage.src:
+b==mxConstants.ARROW_BLOCK_THIN?g="1"!=d?Format.blockThinMarkerImage.src:Format.blockThinFilledMarkerImage.src:b==mxConstants.ARROW_OVAL?g="1"!=d?Format.ovalMarkerImage.src:Format.ovalFilledMarkerImage.src:b==mxConstants.ARROW_DIAMOND?g="1"!=d?Format.diamondMarkerImage.src:Format.diamondFilledMarkerImage.src:b==mxConstants.ARROW_DIAMOND_THIN?g="1"!=d?Format.diamondThinMarkerImage.src:Format.diamondThinFilledMarkerImage.src:"doubleBlock"==b?g="1"!=d?Format.doubleBlockMarkerImage.src:Format.doubleBlockFilledMarkerImage.src:
+"box"==b?g=Format.boxMarkerImage.src:"halfCircle"==b?g=Format.halfCircleMarkerImage.src:"openAsync"==b?g=Format.openAsyncFilledMarkerImage.src:"async"==b?g="1"!=d?Format.asyncMarkerImage.src:Format.asyncFilledMarkerImage.src:"dash"==b?g=Format.dashMarkerImage.src:"baseDash"==b?g=Format.baseDashMarkerImage.src:"cross"==b?g=Format.crossMarkerImage.src:"circle"==b?g=Format.circleMarkerImage.src:"circlePlus"==b?g=Format.circlePlusMarkerImage.src:"ERone"==b?g=Format.EROneMarkerImage.src:"ERmandOne"==b?
+g=Format.ERmandOneMarkerImage.src:"ERmany"==b?g=Format.ERmanyMarkerImage.src:"ERoneToMany"==b?g=Format.ERoneToManyMarkerImage.src:"ERzeroToOne"==b?g=Format.ERzeroToOneMarkerImage.src:"ERzeroToMany"==b&&(g=Format.ERzeroToManyMarkerImage.src);return g};EditorUi.prototype.createMenus=function(){return null};
+EditorUi.prototype.updatePasteActionStates=function(){var b=this.editor.graph,d=this.actions.get("paste"),g=this.actions.get("pasteHere");d.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(!mxClient.IS_FF&&null!=navigator.clipboard||!mxClipboard.isEmpty())&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()));g.setEnabled(d.isEnabled())};
+EditorUi.prototype.initClipboard=function(){var b=this,d=mxClipboard.cut;mxClipboard.cut=function(p){p.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):d.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(p){var E=null;if(p.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{E=E||p.getSelectionCells();E=p.getExportableCells(p.model.getTopmostCells(E));for(var N={},R=p.createCellLookup(E),G=p.cloneCells(E,null,N),M=new mxGraphModel,Q=M.getChildAt(M.getRoot(),
+0),e=0;e<G.length;e++){M.add(Q,G[e]);var f=p.view.getState(E[e]);if(null!=f){var k=p.getCellGeometry(G[e]);null!=k&&k.relative&&!M.isEdge(E[e])&&null==R[mxObjectIdentity.get(M.getParent(E[e]))]&&(k.offset=null,k.relative=!1,k.x=f.x/f.view.scale-f.view.translate.x,k.y=f.y/f.view.scale-f.view.translate.y)}}p.updateCustomLinks(p.createCellMapping(N,R),G);mxClipboard.insertCount=1;mxClipboard.setCells(G)}b.updatePasteActionStates();return E};var g=mxClipboard.paste;mxClipboard.paste=function(p){var E=
+null;p.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):E=g.apply(this,arguments);b.updatePasteActionStates();return E};var l=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){l.apply(this,arguments);b.updatePasteActionStates()};var D=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(p,E){D.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=400;EditorUi.prototype.buttonZoomDelay=600;
-EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var X=this.graph.getPageLayout(),ia=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+X.x*ia.width),this.scale*(this.translate.y+X.y*ia.height),this.scale*X.width*ia.width,
-this.scale*X.height*ia.height)};b.getPreferredPageSize=function(X,ia,q){X=this.getPageLayout();ia=this.getPageSize();return new mxRectangle(0,0,X.width*ia.width,X.height*ia.height)};var e=null,k=this;if(this.editor.isChromelessView()){this.chromelessResize=e=mxUtils.bind(this,function(X,ia,q,E){if(null!=b.container&&!b.isViewer()){q=null!=q?q:0;E=null!=E?E:0;var Q=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),Y=mxUtils.hasScrollbars(b.container),R=b.view.translate,Z=b.view.scale,
-da=mxRectangle.fromRectangle(Q);da.x=da.x/Z-R.x;da.y=da.y/Z-R.y;da.width/=Z;da.height/=Z;R=b.container.scrollTop;var qa=b.container.scrollLeft,va=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)va+=3;var ja=b.container.offsetWidth-va;va=b.container.offsetHeight-va;X=X?Math.max(.3,Math.min(ia||1,ja/da.width)):Z;ia=(ja-X*da.width)/2/X;var sa=0==this.lightboxVerticalDivider?0:(va-X*da.height)/this.lightboxVerticalDivider/X;Y&&(ia=Math.max(ia,0),sa=Math.max(sa,0));
-if(Y||Q.width<ja||Q.height<va)b.view.scaleAndTranslate(X,Math.floor(ia-da.x),Math.floor(sa-da.y)),b.container.scrollTop=R*X/Z,b.container.scrollLeft=qa*X/Z;else if(0!=q||0!=E)Q=b.view.translate,b.view.setTranslate(Math.floor(Q.x+q/Z),Math.floor(Q.y+E/Z))}});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(X){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(X){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var C=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position=
+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 W=this.graph.getPageLayout(),ka=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+W.x*ka.width),this.scale*(this.translate.y+W.y*ka.height),this.scale*W.width*ka.width,
+this.scale*W.height*ka.height)};b.getPreferredPageSize=function(W,ka,q){W=this.getPageLayout();ka=this.getPageSize();return new mxRectangle(0,0,W.width*ka.width,W.height*ka.height)};var d=null,g=this;if(this.editor.isChromelessView()){this.chromelessResize=d=mxUtils.bind(this,function(W,ka,q,F){if(null!=b.container&&!b.isViewer()){q=null!=q?q:0;F=null!=F?F:0;var S=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),ba=mxUtils.hasScrollbars(b.container),U=b.view.translate,ca=b.view.scale,
+ea=mxRectangle.fromRectangle(S);ea.x=ea.x/ca-U.x;ea.y=ea.y/ca-U.y;ea.width/=ca;ea.height/=ca;U=b.container.scrollTop;var na=b.container.scrollLeft,ra=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)ra+=3;var ya=b.container.offsetWidth-ra;ra=b.container.offsetHeight-ra;W=W?Math.max(.3,Math.min(ka||1,ya/ea.width)):ca;ka=(ya-W*ea.width)/2/W;var va=0==this.lightboxVerticalDivider?0:(ra-W*ea.height)/this.lightboxVerticalDivider/W;ba&&(ka=Math.max(ka,0),va=Math.max(va,
+0));if(ba||S.width<ya||S.height<ra)b.view.scaleAndTranslate(W,Math.floor(ka-ea.x),Math.floor(va-ea.y)),b.container.scrollTop=U*W/ca,b.container.scrollLeft=na*W/ca;else if(0!=q||0!=F)S=b.view.translate,b.view.setTranslate(Math.floor(S.x+q/ca),Math.floor(S.y+F/ca))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var l=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",l);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
+"resize",l)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(W){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(W){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var D=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 X=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=X?parseInt(X["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",p);p();var F=0;p=mxUtils.bind(this,function(X,ia,q){F++;
-var E=document.createElement("span");E.style.paddingLeft="8px";E.style.paddingRight="8px";E.style.cursor="pointer";mxEvent.addListener(E,"click",X);null!=q&&E.setAttribute("title",q);X=document.createElement("img");X.setAttribute("border","0");X.setAttribute("src",ia);X.style.width="36px";X.style.filter="invert(100%)";E.appendChild(X);this.chromelessToolbar.appendChild(E);return E});if(null!=C.backBtn){var L=Graph.sanitizeLink(C.backBtn.url);null!=L&&p(mxUtils.bind(this,function(X){window.location.href=
-L;mxEvent.consume(X)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var P=p(mxUtils.bind(this,function(X){this.actions.get("previousPage").funct();mxEvent.consume(X)}),Editor.previousImage,mxResources.get("previousPage")),d=document.createElement("div");d.style.fontFamily=Editor.defaultHtmlFont;d.style.display="inline-block";d.style.verticalAlign="top";d.style.fontWeight="bold";d.style.marginTop="8px";d.style.fontSize="14px";d.style.color=mxClient.IS_IE||mxClient.IS_IE11?
-"#000000":"#ffffff";this.chromelessToolbar.appendChild(d);var f=p(mxUtils.bind(this,function(X){this.actions.get("nextPage").funct();mxEvent.consume(X)}),Editor.nextImage,mxResources.get("nextPage")),g=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(d.innerText="",mxUtils.write(d,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});P.style.paddingLeft="0px";P.style.paddingRight="4px";f.style.paddingLeft="4px";f.style.paddingRight=
-"0px";var x=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(f.style.display="",P.style.display="",d.style.display="inline-block"):(f.style.display="none",P.style.display="none",d.style.display="none");g()});this.editor.addListener("resetGraphView",x);this.editor.addListener("pageSelected",g)}p(mxUtils.bind(this,function(X){this.actions.get("zoomOut").funct();mxEvent.consume(X)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");p(mxUtils.bind(this,
-function(X){this.actions.get("zoomIn").funct();mxEvent.consume(X)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(X){b.isLightboxView()?(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(X)}),Editor.zoomFitImage,mxResources.get("fit"));var y=null,t=null,G=mxUtils.bind(this,function(X){null!=y&&(window.clearTimeout(y),y=null);null!=t&&(window.clearTimeout(t),t=null);y=window.setTimeout(mxUtils.bind(this,
-function(){mxUtils.setOpacity(this.chromelessToolbar,0);y=null;t=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";t=null}),600)}),X||200)}),D=mxUtils.bind(this,function(X){null!=y&&(window.clearTimeout(y),y=null);null!=t&&(window.clearTimeout(t),t=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,X||30)});if("1"==urlParams.layers){this.layersDialog=null;var I=p(mxUtils.bind(this,function(X){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),
-this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var ia=I.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=ia.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));ia=mxUtils.getCurrentStyle(this.editor.graph.container);
-this.layersDialog.style.zIndex=ia.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(X)}),Editor.layersImage,mxResources.get("layers")),H=b.getModel();H.addListener(mxEvent.CHANGE,function(){I.style.display=1<H.getChildCount(H.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(p);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||p(mxUtils.bind(this,function(X){null!=
-this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(X)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(x=0;x<this.lightboxToolbarActions.length;x++){var S=this.lightboxToolbarActions[x];S.elem=p(S.fn,S.icon,S.tooltip)}if(null!=C.refreshBtn){var T=null==C.refreshBtn.url?null:Graph.sanitizeLink(C.refreshBtn.url);
-p(mxUtils.bind(this,function(X){null!=T?window.location.href=T:window.location.reload();mxEvent.consume(X)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=C.fullscreenBtn&&window.self!==window.top&&p(mxUtils.bind(this,function(X){C.fullscreenBtn.url?b.openLink(C.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(X)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(C.closeBtn&&window.self===window.top||b.lightbox&&("1"==
-urlParams.close||this.container!=document.body))&&p(mxUtils.bind(this,function(X){"1"==urlParams.close||C.closeBtn?window.close():(this.destroy(),mxEvent.consume(X))}),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(X){mxEvent.isTouchEvent(X)||(mxEvent.isShiftDown(X)||D(30),G())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(X){mxEvent.consume(X)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(X){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(X)?G():D(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(X){mxEvent.isShiftDown(X)?G():D(100);
-mxEvent.consume(X)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(X){mxEvent.isTouchEvent(X)||D(30)}));var M=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(X,ia){this.startX=ia.getGraphX();this.startY=ia.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(X,ia){},mouseUp:function(X,ia){mxEvent.isTouchEvent(ia.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<
-M&&Math.abs(this.scrollTop-b.container.scrollTop)<M&&Math.abs(this.startX-ia.getGraphX())<M&&Math.abs(this.startY-ia.getGraphY())<M&&(0<parseFloat(k.chromelessToolbar.style.opacity||0)?G():D(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var fa=b.view.validate;b.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var X=this.graph.getPagePadding(),ia=this.graph.getPageSize();this.translate.x=X.x-(this.x0||
-0)*ia.width;this.translate.y=X.y-(this.y0||0)*ia.height}fa.apply(this,arguments)};if(!b.isViewer()){var la=b.sizeDidChange;b.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var X=this.getPageLayout(),ia=this.getPagePadding(),q=this.getPageSize(),E=Math.ceil(2*ia.x+X.width*q.width),Q=Math.ceil(2*ia.y+X.height*q.height),Y=b.minimumGraphSize;if(null==Y||Y.width!=E||Y.height!=Q)b.minimumGraphSize=new mxRectangle(0,0,E,Q);E=ia.x-X.x*q.width;ia=ia.y-X.y*q.height;
-this.autoTranslate||this.view.translate.x==E&&this.view.translate.y==ia?la.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=X.x,this.view.y0=X.y,X=b.view.translate.x,q=b.view.translate.y,b.view.setTranslate(E,ia),b.container.scrollLeft+=Math.round((E-X)*b.view.scale),b.container.scrollTop+=Math.round((ia-q)*b.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ra=b.view.getBackgroundPane(),ba=b.view.getDrawPane();b.cumulativeZoomFactor=
-1;var oa=null,na=null,N=null,aa=null,V=null,ha=function(X){null!=oa&&window.clearTimeout(oa);0<=X&&window.setTimeout(function(){if(!b.isMouseDown||aa)oa=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)),ba.style.transformOrigin="",ra.style.transformOrigin=
-"",mxClient.IS_SF?(ba.style.transform="scale(1)",ra.style.transform="scale(1)",window.setTimeout(function(){ba.style.transform="";ra.style.transform=""},0)):(ba.style.transform="",ra.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var ia=new mxPoint(b.container.scrollLeft,b.container.scrollTop),q=mxUtils.getOffset(b.container),E=b.view.scale,Q=0,Y=0;null!=na&&(Q=b.container.offsetWidth/2-na.x+q.x,Y=b.container.offsetHeight/2-na.y+q.y);b.zoom(b.cumulativeZoomFactor,
-null,b.isFastZoomEnabled()?20:null);b.view.scale!=E&&(null!=N&&(Q+=ia.x-N.x,Y+=ia.y-N.y),null!=e&&k.chromelessResize(!1,null,Q*(b.cumulativeZoomFactor-1),Y*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==Q&&0==Y||(b.container.scrollLeft-=Q*(b.cumulativeZoomFactor-1),b.container.scrollTop-=Y*(b.cumulativeZoomFactor-1)));null!=V&&ba.setAttribute("filter",V);b.cumulativeZoomFactor=1;V=aa=na=N=oa=null}),null!=X?X:b.isFastZoomEnabled()?k.wheelZoomDelay:k.lazyZoomDelay)},0)};b.lazyZoom=
-function(X,ia,q,E){E=null!=E?E:this.zoomFactor;(ia=ia||!b.scrollbars)&&(na=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));X?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=E,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/=E,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;b.isFastZoomEnabled()&&(null==V&&""!=ba.getAttribute("filter")&&(V=ba.getAttribute("filter"),ba.removeAttribute("filter")),N=new mxPoint(b.container.scrollLeft,b.container.scrollTop),X=ia||null==na?b.container.scrollLeft+
-b.container.clientWidth/2:na.x+b.container.scrollLeft-b.container.offsetLeft,E=ia||null==na?b.container.scrollTop+b.container.clientHeight/2:na.y+b.container.scrollTop-b.container.offsetTop,ba.style.transformOrigin=X+"px "+E+"px",ba.style.transform="scale("+this.cumulativeZoomFactor+")",ra.style.transformOrigin=X+"px "+E+"px",ra.style.transform="scale("+this.cumulativeZoomFactor+")",null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(X=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(X.style,
-"transform-origin",(ia||null==na?b.container.clientWidth/2+b.container.scrollLeft-X.offsetLeft+"px":na.x+b.container.scrollLeft-X.offsetLeft-b.container.offsetLeft+"px")+" "+(ia||null==na?b.container.clientHeight/2+b.container.scrollTop-X.offsetTop+"px":na.y+b.container.scrollTop-X.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(X.style,"transform","scale("+this.cumulativeZoomFactor+")")),b.view.getDecoratorPane().style.opacity="0",b.view.getOverlayPane().style.opacity="0",null!=k.hoverIcons&&
-k.hoverIcons.reset());ha(b.isFastZoomEnabled()?q:0)};mxEvent.addGestureListeners(b.container,function(X){null!=oa&&window.clearTimeout(oa)},null,function(X){1!=b.cumulativeZoomFactor&&ha(0)});mxEvent.addListener(b.container,"scroll",function(X){null==oa||b.isMouseDown||1==b.cumulativeZoomFactor||ha(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(X,ia,q,E,Q){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!q&&b.isScrollWheelEvent(X))q=
-b.view.getTranslate(),E=40/b.view.scale,mxEvent.isShiftDown(X)?b.view.setTranslate(q.x+(ia?-E:E),q.y):b.view.setTranslate(q.x,q.y+(ia?E:-E));else if(q||b.isZoomWheelEvent(X))for(var Y=mxEvent.getSource(X);null!=Y;){if(Y==b.container)return b.tooltipHandler.hideTooltip(),na=null!=E&&null!=Q?new mxPoint(E,Q):new mxPoint(mxEvent.getClientX(X),mxEvent.getClientY(X)),aa=q,q=b.zoomFactor,E=null,X.ctrlKey&&null!=X.deltaY&&40>Math.abs(X.deltaY)&&Math.round(X.deltaY)!=X.deltaY?q=1+Math.abs(X.deltaY)/20*(q-
-1):null!=X.movementY&&"pointermove"==X.type&&(q=1+Math.max(1,Math.abs(X.movementY))/20*(q-1),E=-1),b.lazyZoom(ia,null,E,q),mxEvent.consume(X),!1;Y=Y.parentNode}}),b.container);b.panningHandler.zoomGraph=function(X){b.cumulativeZoomFactor=X.scale;b.lazyZoom(0<X.scale,!0);mxEvent.consume(X)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(e){this.actions.get("print").funct();mxEvent.consume(e)}),Editor.printImage,mxResources.get("print"))};
+"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var p=mxUtils.bind(this,function(){var W=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=W?parseInt(W["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",p);p();var E=0;p=mxUtils.bind(this,function(W,ka,q){E++;
+var F=document.createElement("span");F.style.paddingLeft="8px";F.style.paddingRight="8px";F.style.cursor="pointer";mxEvent.addListener(F,"click",W);null!=q&&F.setAttribute("title",q);W=document.createElement("img");W.setAttribute("border","0");W.setAttribute("src",ka);W.style.width="36px";W.style.filter="invert(100%)";F.appendChild(W);this.chromelessToolbar.appendChild(F);return F});if(null!=D.backBtn){var N=Graph.sanitizeLink(D.backBtn.url);null!=N&&p(mxUtils.bind(this,function(W){window.location.href=
+N;mxEvent.consume(W)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var R=p(mxUtils.bind(this,function(W){this.actions.get("previousPage").funct();mxEvent.consume(W)}),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.color=mxClient.IS_IE||mxClient.IS_IE11?
+"#000000":"#ffffff";this.chromelessToolbar.appendChild(G);var M=p(mxUtils.bind(this,function(W){this.actions.get("nextPage").funct();mxEvent.consume(W)}),Editor.nextImage,mxResources.get("nextPage")),Q=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(G.innerText="",mxUtils.write(G,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});R.style.paddingLeft="0px";R.style.paddingRight="4px";M.style.paddingLeft="4px";M.style.paddingRight=
+"0px";var e=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(M.style.display="",R.style.display="",G.style.display="inline-block"):(M.style.display="none",R.style.display="none",G.style.display="none");Q()});this.editor.addListener("resetGraphView",e);this.editor.addListener("pageSelected",Q)}p(mxUtils.bind(this,function(W){this.actions.get("zoomOut").funct();mxEvent.consume(W)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");p(mxUtils.bind(this,
+function(W){this.actions.get("zoomIn").funct();mxEvent.consume(W)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(W){b.isLightboxView()?(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(W)}),Editor.zoomFitImage,mxResources.get("fit"));var f=null,k=null,z=mxUtils.bind(this,function(W){null!=f&&(window.clearTimeout(f),f=null);null!=k&&(window.clearTimeout(k),k=null);f=window.setTimeout(mxUtils.bind(this,
+function(){mxUtils.setOpacity(this.chromelessToolbar,0);f=null;k=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";k=null}),600)}),W||200)}),t=mxUtils.bind(this,function(W){null!=f&&(window.clearTimeout(f),f=null);null!=k&&(window.clearTimeout(k),k=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,W||30)});if("1"==urlParams.layers){this.layersDialog=null;var B=p(mxUtils.bind(this,function(W){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),
+this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var ka=B.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding=
+"4px 2px 4px 2px";this.layersDialog.style.left=ka.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));ka=mxUtils.getCurrentStyle(this.editor.graph.container);
+this.layersDialog.style.zIndex=ka.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(W)}),Editor.layersImage,mxResources.get("layers")),I=b.getModel();I.addListener(mxEvent.CHANGE,function(){B.style.display=1<I.getChildCount(I.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(p);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||p(mxUtils.bind(this,function(W){null!=
+this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(W)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(e=0;e<this.lightboxToolbarActions.length;e++){var O=this.lightboxToolbarActions[e];O.elem=p(O.fn,O.icon,O.tooltip)}if(null!=D.refreshBtn){var J=null==D.refreshBtn.url?null:Graph.sanitizeLink(D.refreshBtn.url);
+p(mxUtils.bind(this,function(W){null!=J?window.location.href=J:window.location.reload();mxEvent.consume(W)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=D.fullscreenBtn&&window.self!==window.top&&p(mxUtils.bind(this,function(W){D.fullscreenBtn.url?b.openLink(D.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(W)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(D.closeBtn&&window.self===window.top||b.lightbox&&("1"==
+urlParams.close||this.container!=document.body))&&p(mxUtils.bind(this,function(W){"1"==urlParams.close||D.closeBtn?window.close():(this.destroy(),mxEvent.consume(W))}),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(W){mxEvent.isTouchEvent(W)||(mxEvent.isShiftDown(W)||t(30),z())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(W){mxEvent.consume(W)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(W){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(W)?z():t(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(W){mxEvent.isShiftDown(W)?z():t(100);
+mxEvent.consume(W)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(W){mxEvent.isTouchEvent(W)||t(30)}));var y=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(W,ka){this.startX=ka.getGraphX();this.startY=ka.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(W,ka){},mouseUp:function(W,ka){mxEvent.isTouchEvent(ka.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<
+y&&Math.abs(this.scrollTop-b.container.scrollTop)<y&&Math.abs(this.startX-ka.getGraphX())<y&&Math.abs(this.startY-ka.getGraphY())<y&&(0<parseFloat(g.chromelessToolbar.style.opacity||0)?z():t(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var ia=b.view.validate;b.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var W=this.graph.getPagePadding(),ka=this.graph.getPageSize();this.translate.x=W.x-(this.x0||
+0)*ka.width;this.translate.y=W.y-(this.y0||0)*ka.height}ia.apply(this,arguments)};if(!b.isViewer()){var da=b.sizeDidChange;b.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var W=this.getPageLayout(),ka=this.getPagePadding(),q=this.getPageSize(),F=Math.ceil(2*ka.x+W.width*q.width),S=Math.ceil(2*ka.y+W.height*q.height),ba=b.minimumGraphSize;if(null==ba||ba.width!=F||ba.height!=S)b.minimumGraphSize=new mxRectangle(0,0,F,S);F=ka.x-W.x*q.width;ka=ka.y-W.y*q.height;
+this.autoTranslate||this.view.translate.x==F&&this.view.translate.y==ka?da.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=W.x,this.view.y0=W.y,W=b.view.translate.x,q=b.view.translate.y,b.view.setTranslate(F,ka),b.container.scrollLeft+=Math.round((F-W)*b.view.scale),b.container.scrollTop+=Math.round((ka-q)*b.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ja=b.view.getBackgroundPane(),aa=b.view.getDrawPane();b.cumulativeZoomFactor=
+1;var qa=null,sa=null,L=null,V=null,T=null,Y=function(W){null!=qa&&window.clearTimeout(qa);0<=W&&window.setTimeout(function(){if(!b.isMouseDown||V)qa=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)),aa.style.transformOrigin="",ja.style.transformOrigin=
+"",mxClient.IS_SF?(aa.style.transform="scale(1)",ja.style.transform="scale(1)",window.setTimeout(function(){aa.style.transform="";ja.style.transform=""},0)):(aa.style.transform="",ja.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var ka=new mxPoint(b.container.scrollLeft,b.container.scrollTop),q=mxUtils.getOffset(b.container),F=b.view.scale,S=0,ba=0;null!=sa&&(S=b.container.offsetWidth/2-sa.x+q.x,ba=b.container.offsetHeight/2-sa.y+q.y);b.zoom(b.cumulativeZoomFactor,
+null,b.isFastZoomEnabled()?20:null);b.view.scale!=F&&(null!=L&&(S+=ka.x-L.x,ba+=ka.y-L.y),null!=d&&g.chromelessResize(!1,null,S*(b.cumulativeZoomFactor-1),ba*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==S&&0==ba||(b.container.scrollLeft-=S*(b.cumulativeZoomFactor-1),b.container.scrollTop-=ba*(b.cumulativeZoomFactor-1)));null!=T&&aa.setAttribute("filter",T);b.cumulativeZoomFactor=1;T=V=sa=L=qa=null}),null!=W?W:b.isFastZoomEnabled()?g.wheelZoomDelay:g.lazyZoomDelay)},0)};b.lazyZoom=
+function(W,ka,q,F){F=null!=F?F:this.zoomFactor;(ka=ka||!b.scrollbars)&&(sa=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));W?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=F,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=
+(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=F,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;b.isFastZoomEnabled()&&(null==T&&""!=aa.getAttribute("filter")&&(T=aa.getAttribute("filter"),aa.removeAttribute("filter")),L=new mxPoint(b.container.scrollLeft,b.container.scrollTop),W=ka||null==sa?b.container.scrollLeft+
+b.container.clientWidth/2:sa.x+b.container.scrollLeft-b.container.offsetLeft,F=ka||null==sa?b.container.scrollTop+b.container.clientHeight/2:sa.y+b.container.scrollTop-b.container.offsetTop,aa.style.transformOrigin=W+"px "+F+"px",aa.style.transform="scale("+this.cumulativeZoomFactor+")",ja.style.transformOrigin=W+"px "+F+"px",ja.style.transform="scale("+this.cumulativeZoomFactor+")",null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(W=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(W.style,
+"transform-origin",(ka||null==sa?b.container.clientWidth/2+b.container.scrollLeft-W.offsetLeft+"px":sa.x+b.container.scrollLeft-W.offsetLeft-b.container.offsetLeft+"px")+" "+(ka||null==sa?b.container.clientHeight/2+b.container.scrollTop-W.offsetTop+"px":sa.y+b.container.scrollTop-W.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(W.style,"transform","scale("+this.cumulativeZoomFactor+")")),b.view.getDecoratorPane().style.opacity="0",b.view.getOverlayPane().style.opacity="0",null!=g.hoverIcons&&
+g.hoverIcons.reset());Y(b.isFastZoomEnabled()?q:0)};mxEvent.addGestureListeners(b.container,function(W){null!=qa&&window.clearTimeout(qa)},null,function(W){1!=b.cumulativeZoomFactor&&Y(0)});mxEvent.addListener(b.container,"scroll",function(W){null==qa||b.isMouseDown||1==b.cumulativeZoomFactor||Y(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(W,ka,q,F,S){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!q&&b.isScrollWheelEvent(W))q=
+b.view.getTranslate(),F=40/b.view.scale,mxEvent.isShiftDown(W)?b.view.setTranslate(q.x+(ka?-F:F),q.y):b.view.setTranslate(q.x,q.y+(ka?F:-F));else if(q||b.isZoomWheelEvent(W))for(var ba=mxEvent.getSource(W);null!=ba;){if(ba==b.container)return b.tooltipHandler.hideTooltip(),sa=null!=F&&null!=S?new mxPoint(F,S):new mxPoint(mxEvent.getClientX(W),mxEvent.getClientY(W)),V=q,q=b.zoomFactor,F=null,W.ctrlKey&&null!=W.deltaY&&40>Math.abs(W.deltaY)&&Math.round(W.deltaY)!=W.deltaY?q=1+Math.abs(W.deltaY)/20*
+(q-1):null!=W.movementY&&"pointermove"==W.type&&(q=1+Math.max(1,Math.abs(W.movementY))/20*(q-1),F=-1),b.lazyZoom(ka,null,F,q),mxEvent.consume(W),!1;ba=ba.parentNode}}),b.container);b.panningHandler.zoomGraph=function(W){b.cumulativeZoomFactor=W.scale;b.lazyZoom(0<W.scale,!0);mxEvent.consume(W)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(d){this.actions.get("print").funct();mxEvent.consume(d)}),Editor.printImage,mxResources.get("print"))};
EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(b){return Graph.createOffscreenGraph(b)};EditorUi.prototype.addChromelessClickHandler=function(){var b=urlParams.highlight;null!=b&&0<b.length&&(b="#"+b);this.editor.graph.addClickHandler(b)};
-EditorUi.prototype.toggleFormatPanel=function(b){b=null!=b?b:0==this.formatWidth;null!=this.format&&(this.formatWidth=b?240:0,this.formatContainer.style.display=b?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};
-EditorUi.prototype.lightboxFit=function(b){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var e=urlParams.border,k=60;null!=e&&(k=parseInt(e));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(k,null,null,null,null,null,b);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var b=this.editor.graph.getModel();return 1==b.getChildCount(b.root)&&0==b.getChildCount(b.getChildAt(b.root,0))};
+EditorUi.prototype.toggleFormatPanel=function(b){b=null!=b?b:0==this.formatWidth;null!=this.format&&(this.formatWidth=b?240:0,this.formatContainer.style.display=b?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};EditorUi.prototype.isFormatPanelVisible=function(){return 0<this.formatWidth};
+EditorUi.prototype.lightboxFit=function(b){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var d=urlParams.border,g=60;null!=d&&(g=parseInt(d));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))};
EditorUi.prototype.isSelectionAllowed=function(b){return"SELECT"==mxEvent.getSource(b).nodeName||"INPUT"==mxEvent.getSource(b).nodeName&&mxUtils.isAncestorNode(this.formatContainer,mxEvent.getSource(b))};EditorUi.prototype.addBeforeUnloadListener=function(){window.onbeforeunload=mxUtils.bind(this,function(){if(!this.editor.isChromelessView())return this.onBeforeUnload()})};EditorUi.prototype.onBeforeUnload=function(){if(this.editor.modified)return mxResources.get("allChangesLost")};
-EditorUi.prototype.open=function(){try{null!=window.opener&&null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(b,e){try{var k=mxUtils.parseXml(b);this.editor.setGraphXml(k.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=e&&(this.editor.setFilename(e),this.updateDocumentTitle())}catch(m){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+m.message)}}))}catch(b){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();
-this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.showPopupMenu=function(b,e,k,m){this.editor.graph.popupMenuHandler.hideMenu();var C=new mxPopupMenu(b);C.div.className+=" geMenubarMenu";C.smartSeparators=!0;C.showDisabled=!0;C.autoExpand=!0;C.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(C,arguments);C.destroy()});C.popup(e,k,null,m);this.setCurrentMenu(C)};
-EditorUi.prototype.setCurrentMenu=function(b,e){this.currentMenuElt=e;this.currentMenu=b};EditorUi.prototype.resetCurrentMenu=function(){this.currentMenu=this.currentMenuElt=null};EditorUi.prototype.hideCurrentMenu=function(){null!=this.currentMenu&&(this.currentMenu.hideMenu(),this.resetCurrentMenu())};EditorUi.prototype.updateDocumentTitle=function(){var b=this.editor.getOrCreateFilename();null!=this.editor.appName&&(b+=" - "+this.editor.appName);document.title=b};
-EditorUi.prototype.createHoverIcons=function(){return new HoverIcons(this.editor.graph)};EditorUi.prototype.redo=function(){try{this.editor.graph.isEditing()?document.execCommand("redo",!1,null):this.editor.undoManager.redo()}catch(b){}};EditorUi.prototype.undo=function(){try{var b=this.editor.graph;if(b.isEditing()){var e=b.cellEditor.textarea.innerHTML;document.execCommand("undo",!1,null);e==b.cellEditor.textarea.innerHTML&&(b.stopEditing(!0),this.editor.undoManager.undo())}else this.editor.undoManager.undo()}catch(k){}};
-EditorUi.prototype.canRedo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canRedo()};EditorUi.prototype.canUndo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canUndo()};EditorUi.prototype.getEditBlankXml=function(){return mxUtils.getXml(this.editor.getGraphXml())};EditorUi.prototype.getUrl=function(b){b=null!=b?b:window.location.pathname;var e=0<b.indexOf("?")?1:0,k;for(k in urlParams)b=0==e?b+"?":b+"&",b+=k+"="+urlParams[k],e++;return b};
-EditorUi.prototype.setScrollbars=function(b){var e=this.editor.graph,k=e.container.style.overflow;e.scrollbars=b;this.editor.updateGraphComponents();k!=e.container.style.overflow&&(e.container.scrollTop=0,e.container.scrollLeft=0,e.view.scaleAndTranslate(1,0,0),this.resetScrollbars());this.fireEvent(new mxEventObject("scrollbarsChanged"))};EditorUi.prototype.hasScrollbars=function(){return this.editor.graph.scrollbars};
-EditorUi.prototype.resetScrollbars=function(){var b=this.editor.graph;if(!this.editor.extendCanvas)b.container.scrollTop=0,b.container.scrollLeft=0,mxUtils.hasScrollbars(b.container)||b.view.setTranslate(0,0);else if(!this.editor.isChromelessView())if(mxUtils.hasScrollbars(b.container))if(b.pageVisible){var e=b.getPagePadding();b.container.scrollTop=Math.floor(e.y-this.editor.initialTopSpacing)-1;b.container.scrollLeft=Math.floor(Math.min(e.x,(b.container.scrollWidth-b.container.clientWidth)/2))-
-1;e=b.getGraphBounds();0<e.width&&0<e.height&&(e.x>b.container.scrollLeft+.9*b.container.clientWidth&&(b.container.scrollLeft=Math.min(e.x+e.width-b.container.clientWidth,e.x-10)),e.y>b.container.scrollTop+.9*b.container.clientHeight&&(b.container.scrollTop=Math.min(e.y+e.height-b.container.clientHeight,e.y-10)))}else{e=b.getGraphBounds();var k=Math.max(e.width,b.scrollTileSize.width*b.view.scale);b.container.scrollTop=Math.floor(Math.max(0,e.y-Math.max(20,(b.container.clientHeight-Math.max(e.height,
-b.scrollTileSize.height*b.view.scale))/4)));b.container.scrollLeft=Math.floor(Math.max(0,e.x-Math.max(0,(b.container.clientWidth-k)/2)))}else{e=mxRectangle.fromRectangle(b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds());k=b.view.translate;var m=b.view.scale;e.x=e.x/m-k.x;e.y=e.y/m-k.y;e.width/=m;e.height/=m;b.view.setTranslate(Math.floor(Math.max(0,(b.container.clientWidth-e.width)/2)-e.x+2),Math.floor((b.pageVisible?0:Math.max(0,(b.container.clientHeight-e.height)/4))-e.y+1))}};
-EditorUi.prototype.setPageVisible=function(b){var e=this.editor.graph,k=mxUtils.hasScrollbars(e.container),m=0,C=0;k&&(m=e.view.translate.x*e.view.scale-e.container.scrollLeft,C=e.view.translate.y*e.view.scale-e.container.scrollTop);e.pageVisible=b;e.pageBreaksVisible=b;e.preferPageSize=b;e.view.validateBackground();if(k){var p=e.getSelectionCells();e.clearSelection();e.setSelectionCells(p)}e.sizeDidChange();k&&(e.container.scrollLeft=e.view.translate.x*e.view.scale-m,e.container.scrollTop=e.view.translate.y*
-e.view.scale-C);e.defaultPageVisible=b;this.fireEvent(new mxEventObject("pageViewChanged"))};
-EditorUi.prototype.installResizeHandler=function(b,e,k){e&&(b.window.setSize=function(C,p){if(!this.minimized){var F=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;C=Math.min(C,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.getX());p=Math.min(p,F-this.getY())}mxWindow.prototype.setSize.apply(this,arguments)});b.window.setLocation=function(C,p){var F=window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth,
-L=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,P=parseInt(this.div.style.width),d=parseInt(this.div.style.height);C=Math.max(0,Math.min(C,F-P));p=Math.max(0,Math.min(p,L-d));this.getX()==C&&this.getY()==p||mxWindow.prototype.setLocation.apply(this,arguments);e&&!this.minimized&&this.setSize(P,d)};var m=mxUtils.bind(this,function(){var C=b.window.getX(),p=b.window.getY();b.window.setLocation(C,p)});mxEvent.addListener(window,"resize",m);b.destroy=function(){mxEvent.removeListener(window,
-"resize",m);b.window.destroy();null!=k&&k()}};function ChangeGridColor(b,e){this.ui=b;this.color=e}ChangeGridColor.prototype.execute=function(){var b=this.ui.editor.graph.view.gridColor;this.ui.setGridColor(this.color);this.color=b};(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);mxCodecRegistry.register(b)})();
-function ChangePageSetup(b,e,k,m,C){this.ui=b;this.previousColor=this.color=e;this.previousImage=this.image=k;this.previousFormat=this.format=m;this.previousPageScale=this.pageScale=C;this.ignoreImage=this.ignoreColor=!1}
-ChangePageSetup.prototype.execute=function(){var b=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var e=b.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=e}if(!this.ignoreImage){this.image=this.previousImage;e=b.backgroundImage;var k=this.previousImage;null!=k&&null!=k.src&&"data:page/id,"==k.src.substring(0,13)&&(k=this.ui.createImageForPageLink(k.src,this.ui.currentPage));this.ui.setBackgroundImage(k);this.previousImage=e}null!=this.previousFormat&&
-(this.format=this.previousFormat,e=b.pageFormat,this.previousFormat.width!=e.width||this.previousFormat.height!=e.height)&&(this.ui.setPageFormat(this.previousFormat),this.previousFormat=e);null!=this.foldingEnabled&&this.foldingEnabled!=this.ui.editor.graph.foldingEnabled&&(this.ui.setFoldingEnabled(this.foldingEnabled),this.foldingEnabled=!this.foldingEnabled);null!=this.previousPageScale&&(b=this.ui.editor.graph.pageScale,this.previousPageScale!=b&&(this.ui.setPageScale(this.previousPageScale),
-this.previousPageScale=b))};(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat","previousPageScale"]);b.afterDecode=function(e,k,m){m.previousColor=m.color;m.previousImage=m.image;m.previousFormat=m.format;m.previousPageScale=m.pageScale;null!=m.foldingEnabled&&(m.foldingEnabled=!m.foldingEnabled);return m};mxCodecRegistry.register(b)})();
+EditorUi.prototype.open=function(){try{null!=window.opener&&null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(b,d){try{var g=mxUtils.parseXml(b);this.editor.setGraphXml(g.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=d&&(this.editor.setFilename(d),this.updateDocumentTitle())}catch(l){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+l.message)}}))}catch(b){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();
+this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.showPopupMenu=function(b,d,g,l){this.editor.graph.popupMenuHandler.hideMenu();var D=new mxPopupMenu(b);D.div.className+=" geMenubarMenu";D.smartSeparators=!0;D.showDisabled=!0;D.autoExpand=!0;D.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(D,arguments);D.destroy()});D.popup(d,g,null,l);this.setCurrentMenu(D)};
+EditorUi.prototype.setCurrentMenu=function(b,d){this.currentMenuElt=d;this.currentMenu=b};EditorUi.prototype.resetCurrentMenu=function(){this.currentMenu=this.currentMenuElt=null};EditorUi.prototype.hideCurrentMenu=function(){null!=this.currentMenu&&(this.currentMenu.hideMenu(),this.resetCurrentMenu())};EditorUi.prototype.updateDocumentTitle=function(){var b=this.editor.getOrCreateFilename();null!=this.editor.appName&&(b+=" - "+this.editor.appName);document.title=b};
+EditorUi.prototype.createHoverIcons=function(){return new HoverIcons(this.editor.graph)};EditorUi.prototype.redo=function(){try{this.editor.graph.isEditing()?document.execCommand("redo",!1,null):this.editor.undoManager.redo()}catch(b){}};EditorUi.prototype.undo=function(){try{var b=this.editor.graph;if(b.isEditing()){var d=b.cellEditor.textarea.innerHTML;document.execCommand("undo",!1,null);d==b.cellEditor.textarea.innerHTML&&(b.stopEditing(!0),this.editor.undoManager.undo())}else this.editor.undoManager.undo()}catch(g){}};
+EditorUi.prototype.canRedo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canRedo()};EditorUi.prototype.canUndo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canUndo()};EditorUi.prototype.getEditBlankXml=function(){return mxUtils.getXml(this.editor.getGraphXml())};EditorUi.prototype.getUrl=function(b){b=null!=b?b:window.location.pathname;var d=0<b.indexOf("?")?1:0,g;for(g in urlParams)b=0==d?b+"?":b+"&",b+=g+"="+urlParams[g],d++;return b};
+EditorUi.prototype.setScrollbars=function(b){var d=this.editor.graph,g=d.container.style.overflow;d.scrollbars=b;this.editor.updateGraphComponents();g!=d.container.style.overflow&&(d.container.scrollTop=0,d.container.scrollLeft=0,d.view.scaleAndTranslate(1,0,0),this.resetScrollbars());this.fireEvent(new mxEventObject("scrollbarsChanged"))};EditorUi.prototype.hasScrollbars=function(){return this.editor.graph.scrollbars};
+EditorUi.prototype.resetScrollbars=function(){var b=this.editor.graph;if(!this.editor.extendCanvas)b.container.scrollTop=0,b.container.scrollLeft=0,mxUtils.hasScrollbars(b.container)||b.view.setTranslate(0,0);else if(!this.editor.isChromelessView())if(mxUtils.hasScrollbars(b.container))if(b.pageVisible){var d=b.getPagePadding();b.container.scrollTop=Math.floor(d.y-this.editor.initialTopSpacing)-1;b.container.scrollLeft=Math.floor(Math.min(d.x,(b.container.scrollWidth-b.container.clientWidth)/2))-
+1;d=b.getGraphBounds();0<d.width&&0<d.height&&(d.x>b.container.scrollLeft+.9*b.container.clientWidth&&(b.container.scrollLeft=Math.min(d.x+d.width-b.container.clientWidth,d.x-10)),d.y>b.container.scrollTop+.9*b.container.clientHeight&&(b.container.scrollTop=Math.min(d.y+d.height-b.container.clientHeight,d.y-10)))}else{d=b.getGraphBounds();var g=Math.max(d.width,b.scrollTileSize.width*b.view.scale);b.container.scrollTop=Math.floor(Math.max(0,d.y-Math.max(20,(b.container.clientHeight-Math.max(d.height,
+b.scrollTileSize.height*b.view.scale))/4)));b.container.scrollLeft=Math.floor(Math.max(0,d.x-Math.max(0,(b.container.clientWidth-g)/2)))}else{d=mxRectangle.fromRectangle(b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds());g=b.view.translate;var l=b.view.scale;d.x=d.x/l-g.x;d.y=d.y/l-g.y;d.width/=l;d.height/=l;b.view.setTranslate(Math.floor(Math.max(0,(b.container.clientWidth-d.width)/2)-d.x+2),Math.floor((b.pageVisible?0:Math.max(0,(b.container.clientHeight-d.height)/4))-d.y+1))}};
+EditorUi.prototype.setPageVisible=function(b){var d=this.editor.graph,g=mxUtils.hasScrollbars(d.container),l=0,D=0;g&&(l=d.view.translate.x*d.view.scale-d.container.scrollLeft,D=d.view.translate.y*d.view.scale-d.container.scrollTop);d.pageVisible=b;d.pageBreaksVisible=b;d.preferPageSize=b;d.view.validateBackground();if(g){var p=d.getSelectionCells();d.clearSelection();d.setSelectionCells(p)}d.sizeDidChange();g&&(d.container.scrollLeft=d.view.translate.x*d.view.scale-l,d.container.scrollTop=d.view.translate.y*
+d.view.scale-D);d.defaultPageVisible=b;this.fireEvent(new mxEventObject("pageViewChanged"))};
+EditorUi.prototype.installResizeHandler=function(b,d,g){d&&(b.window.setSize=function(D,p){if(!this.minimized){var E=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;D=Math.min(D,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.getX());p=Math.min(p,E-this.getY())}mxWindow.prototype.setSize.apply(this,arguments)});b.window.setLocation=function(D,p){var E=window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth,
+N=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,R=parseInt(this.div.style.width),G=parseInt(this.div.style.height);D=Math.max(0,Math.min(D,E-R));p=Math.max(0,Math.min(p,N-G));this.getX()==D&&this.getY()==p||mxWindow.prototype.setLocation.apply(this,arguments);d&&!this.minimized&&this.setSize(R,G)};var l=mxUtils.bind(this,function(){var D=b.window.getX(),p=b.window.getY();b.window.setLocation(D,p)});mxEvent.addListener(window,"resize",l);b.destroy=function(){mxEvent.removeListener(window,
+"resize",l);b.window.destroy();null!=g&&g()}};function ChangeGridColor(b,d){this.ui=b;this.color=d}ChangeGridColor.prototype.execute=function(){var b=this.ui.editor.graph.view.gridColor;this.ui.setGridColor(this.color);this.color=b};(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);mxCodecRegistry.register(b)})();
+function ChangePageSetup(b,d,g,l,D){this.ui=b;this.previousColor=this.color=d;this.previousImage=this.image=g;this.previousFormat=this.format=l;this.previousPageScale=this.pageScale=D;this.ignoreImage=this.ignoreColor=!1}
+ChangePageSetup.prototype.execute=function(){var b=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var d=b.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=d}if(!this.ignoreImage){this.image=this.previousImage;d=b.backgroundImage;var g=this.previousImage;null!=g&&null!=g.src&&"data:page/id,"==g.src.substring(0,13)&&(g=this.ui.createImageForPageLink(g.src,this.ui.currentPage));this.ui.setBackgroundImage(g);this.previousImage=d}null!=this.previousFormat&&
+(this.format=this.previousFormat,d=b.pageFormat,this.previousFormat.width!=d.width||this.previousFormat.height!=d.height)&&(this.ui.setPageFormat(this.previousFormat),this.previousFormat=d);null!=this.foldingEnabled&&this.foldingEnabled!=this.ui.editor.graph.foldingEnabled&&(this.ui.setFoldingEnabled(this.foldingEnabled),this.foldingEnabled=!this.foldingEnabled);null!=this.previousPageScale&&(b=this.ui.editor.graph.pageScale,this.previousPageScale!=b&&(this.ui.setPageScale(this.previousPageScale),
+this.previousPageScale=b))};(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat","previousPageScale"]);b.afterDecode=function(d,g,l){l.previousColor=l.color;l.previousImage=l.image;l.previousFormat=l.format;l.previousPageScale=l.pageScale;null!=l.foldingEnabled&&(l.foldingEnabled=!l.foldingEnabled);return l};mxCodecRegistry.register(b)})();
EditorUi.prototype.setBackgroundColor=function(b){this.editor.graph.background=b;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("backgroundColorChanged"))};EditorUi.prototype.setFoldingEnabled=function(b){this.editor.graph.foldingEnabled=b;this.editor.graph.view.revalidate();this.fireEvent(new mxEventObject("foldingEnabledChanged"))};
-EditorUi.prototype.setPageFormat=function(b,e){e=null!=e?e:"1"==urlParams.sketch;this.editor.graph.pageFormat=b;e||(this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct());this.fireEvent(new mxEventObject("pageFormatChanged"))};
+EditorUi.prototype.setPageFormat=function(b,d){d=null!=d?d:"1"==urlParams.sketch;this.editor.graph.pageFormat=b;d||(this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct());this.fireEvent(new mxEventObject("pageFormatChanged"))};
EditorUi.prototype.setPageScale=function(b){this.editor.graph.pageScale=b;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageScaleChanged"))};EditorUi.prototype.setGridColor=function(b){this.editor.graph.view.gridColor=b;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("gridColorChanged"))};
-EditorUi.prototype.addUndoListener=function(){var b=this.actions.get("undo"),e=this.actions.get("redo"),k=this.editor.undoManager,m=mxUtils.bind(this,function(){b.setEnabled(this.canUndo());e.setEnabled(this.canRedo())});k.addListener(mxEvent.ADD,m);k.addListener(mxEvent.UNDO,m);k.addListener(mxEvent.REDO,m);k.addListener(mxEvent.CLEAR,m);var C=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){C.apply(this,arguments);m()};var p=this.editor.graph.cellEditor.stopEditing;
-this.editor.graph.cellEditor.stopEditing=function(F,L){p.apply(this,arguments);m()};m()};
-EditorUi.prototype.updateActionStates=function(){for(var b=this.editor.graph,e=this.getSelectionState(),k=b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()),m="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded strokeColor sharp snapToGrid".split(" "),C=0;C<m.length;C++)this.actions.get(m[C]).setEnabled(0<e.cells.length);
-this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);this.actions.get("pasteSize").setEnabled(null!=this.copiedSize&&0<e.vertices.length);this.actions.get("pasteData").setEnabled(null!=this.copiedValue&&0<e.cells.length);this.actions.get("setAsDefaultStyle").setEnabled(1==b.getSelectionCount());this.actions.get("lockUnlock").setEnabled(!b.isSelectionEmpty());this.actions.get("bringForward").setEnabled(1==e.cells.length);this.actions.get("sendBackward").setEnabled(1==
-e.cells.length);this.actions.get("rotation").setEnabled(1==e.vertices.length);this.actions.get("wordWrap").setEnabled(1==e.vertices.length);this.actions.get("autosize").setEnabled(0<e.vertices.length);this.actions.get("copySize").setEnabled(1==e.vertices.length);this.actions.get("clearWaypoints").setEnabled(e.connections);this.actions.get("curved").setEnabled(0<e.edges.length);this.actions.get("turn").setEnabled(0<e.cells.length);this.actions.get("group").setEnabled(!e.row&&!e.cell&&(1<e.cells.length||
-1==e.vertices.length&&0==b.model.getChildCount(e.cells[0])&&!b.isContainer(e.vertices[0])));this.actions.get("ungroup").setEnabled(!e.row&&!e.cell&&!e.table&&0<e.vertices.length&&(b.isContainer(e.vertices[0])||0<b.getModel().getChildCount(e.vertices[0])));this.actions.get("removeFromGroup").setEnabled(1==e.cells.length&&b.getModel().isVertex(b.getModel().getParent(e.cells[0])));this.actions.get("collapsible").setEnabled(1==e.vertices.length&&(0<b.model.getChildCount(e.vertices[0])||b.isContainer(e.vertices[0])));
-this.actions.get("exitGroup").setEnabled(null!=b.view.currentRoot);this.actions.get("home").setEnabled(null!=b.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==e.cells.length&&b.isValidRoot(e.cells[0]));this.actions.get("editLink").setEnabled(1==e.cells.length);this.actions.get("openLink").setEnabled(1==e.cells.length&&null!=b.getLinkForCell(e.cells[0]));this.actions.get("guides").setEnabled(b.isEnabled());this.actions.get("selectVertices").setEnabled(k);this.actions.get("selectEdges").setEnabled(k);
-this.actions.get("selectAll").setEnabled(k);this.actions.get("selectNone").setEnabled(k);m=1==e.vertices.length&&b.isCellFoldable(e.vertices[0]);this.actions.get("expand").setEnabled(m);this.actions.get("collapse").setEnabled(m);this.menus.get("navigation").setEnabled(0<e.cells.length||null!=b.view.currentRoot);this.menus.get("layout").setEnabled(k);this.menus.get("insert").setEnabled(k);this.menus.get("direction").setEnabled(e.unlocked&&1==e.vertices.length);this.menus.get("distribute").setEnabled(e.unlocked&&
-1<e.vertices.length);this.menus.get("align").setEnabled(e.unlocked&&0<e.cells.length);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};
-EditorUi.prototype.refresh=function(b){if(null!=this.formatContainer&&null!=this.formatContainer.parentNode&&"geEditor"!=this.formatContainer.parentNode.className)this.diagramContainer.style.left="0",this.diagramContainer.style.top="0",this.diagramContainer.style.right="0",this.diagramContainer.style.bottom="0";else{b=null!=b?b:!0;var e=this.container.clientWidth,k=this.container.clientHeight;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth,k=document.documentElement.clientHeight);
-var m=0;mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&window.innerHeight!=document.documentElement.clientHeight&&(m=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var C=Math.max(0,Math.min(this.hsplitPosition,e-this.splitSize-20));e=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",e+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=
-this.toolbarHeight+"px",e+=this.toolbarHeight);0<e&&(e+=1);var p=0;if(null!=this.sidebarFooterContainer){var F=this.footerHeight+m;p=Math.max(0,Math.min(k-e-F,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=C+"px";this.sidebarFooterContainer.style.height=p+"px";this.sidebarFooterContainer.style.bottom=F+"px"}k=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=e+"px";this.sidebarContainer.style.width=C+"px";this.formatContainer.style.top=e+"px";this.formatContainer.style.width=
-k+"px";this.formatContainer.style.display=null!=this.format?"":"none";F=this.getDiagramContainerOffset();var L=null!=this.hsplit.parentNode?C+this.splitSize:0;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+m+"px";this.hsplit.style.left=C+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=L+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=
-m+"px");C=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+m+"px",this.tabContainer.style.right=k+"px",C=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+p+m+"px";this.formatContainer.style.bottom=this.footerHeight+m+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=L+F.x+"px",this.diagramContainer.style.top=e+F.y+"px",this.diagramContainer.style.right=k+"px",this.diagramContainer.style.bottom=this.footerHeight+m+C+"px");
-b&&this.editor.graph.sizeDidChange()}};EditorUi.prototype.createTabContainer=function(){return null};
+EditorUi.prototype.addUndoListener=function(){var b=this.actions.get("undo"),d=this.actions.get("redo"),g=this.editor.undoManager,l=mxUtils.bind(this,function(){b.setEnabled(this.canUndo());d.setEnabled(this.canRedo())});g.addListener(mxEvent.ADD,l);g.addListener(mxEvent.UNDO,l);g.addListener(mxEvent.REDO,l);g.addListener(mxEvent.CLEAR,l);var D=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){D.apply(this,arguments);l()};var p=this.editor.graph.cellEditor.stopEditing;
+this.editor.graph.cellEditor.stopEditing=function(E,N){p.apply(this,arguments);l()};l()};
+EditorUi.prototype.updateActionStates=function(){for(var b=this.editor.graph,d=this.getSelectionState(),g=b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()),l="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded strokeColor sharp snapToGrid".split(" "),D=0;D<l.length;D++)this.actions.get(l[D]).setEnabled(0<d.cells.length);
+this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);this.actions.get("pasteSize").setEnabled(null!=this.copiedSize&&0<d.vertices.length);this.actions.get("pasteData").setEnabled(null!=this.copiedValue&&0<d.cells.length);this.actions.get("setAsDefaultStyle").setEnabled(1==b.getSelectionCount());this.actions.get("lockUnlock").setEnabled(!b.isSelectionEmpty());this.actions.get("bringForward").setEnabled(1==d.cells.length);this.actions.get("sendBackward").setEnabled(1==
+d.cells.length);this.actions.get("rotation").setEnabled(1==d.vertices.length);this.actions.get("wordWrap").setEnabled(1==d.vertices.length);this.actions.get("autosize").setEnabled(0<d.vertices.length);this.actions.get("copySize").setEnabled(1==d.vertices.length);this.actions.get("clearWaypoints").setEnabled(d.connections);this.actions.get("curved").setEnabled(0<d.edges.length);this.actions.get("turn").setEnabled(0<d.cells.length);this.actions.get("group").setEnabled(!d.row&&!d.cell&&(1<d.cells.length||
+1==d.vertices.length&&0==b.model.getChildCount(d.cells[0])&&!b.isContainer(d.vertices[0])));this.actions.get("ungroup").setEnabled(!d.row&&!d.cell&&!d.table&&0<d.vertices.length&&(b.isContainer(d.vertices[0])||0<b.getModel().getChildCount(d.vertices[0])));this.actions.get("removeFromGroup").setEnabled(1==d.cells.length&&b.getModel().isVertex(b.getModel().getParent(d.cells[0])));this.actions.get("collapsible").setEnabled(1==d.vertices.length&&(0<b.model.getChildCount(d.vertices[0])||b.isContainer(d.vertices[0])));
+this.actions.get("exitGroup").setEnabled(null!=b.view.currentRoot);this.actions.get("home").setEnabled(null!=b.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==d.cells.length&&b.isValidRoot(d.cells[0]));this.actions.get("editLink").setEnabled(1==d.cells.length);this.actions.get("openLink").setEnabled(1==d.cells.length&&null!=b.getLinkForCell(d.cells[0]));this.actions.get("guides").setEnabled(b.isEnabled());this.actions.get("selectVertices").setEnabled(g);this.actions.get("selectEdges").setEnabled(g);
+this.actions.get("selectAll").setEnabled(g);this.actions.get("selectNone").setEnabled(g);l=1==d.vertices.length&&b.isCellFoldable(d.vertices[0]);this.actions.get("expand").setEnabled(l);this.actions.get("collapse").setEnabled(l);this.menus.get("navigation").setEnabled(0<d.cells.length||null!=b.view.currentRoot);this.menus.get("layout").setEnabled(g);this.menus.get("insert").setEnabled(g);this.menus.get("direction").setEnabled(d.unlocked&&1==d.vertices.length);this.menus.get("distribute").setEnabled(d.unlocked&&
+1<d.vertices.length);this.menus.get("align").setEnabled(d.unlocked&&0<d.cells.length);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};
+EditorUi.prototype.refresh=function(b){b=null!=b?b:!0;var d=this.container.clientWidth,g=this.container.clientHeight;this.container==document.body&&(d=document.body.clientWidth||document.documentElement.clientWidth,g=document.documentElement.clientHeight);var l=0;mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&window.innerHeight!=document.documentElement.clientHeight&&(l=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var D=Math.max(0,Math.min(this.hsplitPosition,
+d-this.splitSize-20));d=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",d+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",d+=this.toolbarHeight);0<d&&(d+=1);var p=0;if(null!=this.sidebarFooterContainer){var E=this.footerHeight+l;p=Math.max(0,Math.min(g-d-E,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=D+"px";this.sidebarFooterContainer.style.height=
+p+"px";this.sidebarFooterContainer.style.bottom=E+"px"}g=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=d+"px";this.sidebarContainer.style.width=D+"px";this.formatContainer.style.top=d+"px";this.formatContainer.style.width=g+"px";this.formatContainer.style.display=null!=this.format?"":"none";E=this.getDiagramContainerOffset();var N=null!=this.hsplit.parentNode?D+this.splitSize:0;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;
+this.hsplit.style.bottom=this.footerHeight+l+"px";this.hsplit.style.left=D+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=N+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=l+"px");D=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+l+"px",this.tabContainer.style.right=g+"px",D=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+p+l+"px";this.formatContainer.style.bottom=
+this.footerHeight+l+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=N+E.x+"px",this.diagramContainer.style.top=d+E.y+"px",this.diagramContainer.style.right=g+"px",this.diagramContainer.style.bottom=this.footerHeight+l+D+"px");b&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
EditorUi.prototype.createDivs=function(){this.menubarContainer=this.createDiv("geMenubarContainer");this.toolbarContainer=this.createDiv("geToolbarContainer");this.sidebarContainer=this.createDiv("geSidebarContainer");this.formatContainer=this.createDiv("geSidebarContainer geFormatContainer");this.diagramContainer=this.createDiv("geDiagramContainer");this.footerContainer=this.createDiv("geFooterContainer");this.hsplit=this.createDiv("geHsplit");this.hsplit.setAttribute("title",mxResources.get("collapseExpand"));
this.menubarContainer.style.top="0px";this.menubarContainer.style.left="0px";this.menubarContainer.style.right="0px";this.toolbarContainer.style.left="0px";this.toolbarContainer.style.right="0px";this.sidebarContainer.style.left="0px";this.formatContainer.style.right="0px";this.formatContainer.style.zIndex="1";this.diagramContainer.style.right=(null!=this.format?this.formatWidth:0)+"px";this.footerContainer.style.left="0px";this.footerContainer.style.right="0px";this.footerContainer.style.bottom=
"0px";this.footerContainer.style.zIndex=mxPopupMenu.prototype.zIndex-3;this.hsplit.style.width=this.splitSize+"px";if(this.sidebarFooterContainer=this.createSidebarFooterContainer())this.sidebarFooterContainer.style.left="0px";this.editor.chromeless?this.diagramContainer.style.border="none":this.tabContainer=this.createTabContainer()};
@@ -2227,205 +2227,204 @@ EditorUi.prototype.createSidebarContainer=function(){var b=document.createElemen
EditorUi.prototype.createUi=function(){this.menubar=this.editor.chromeless?null:this.menus.createMenubar(this.createDiv("geMenubar"));null!=this.menubar&&this.menubarContainer.appendChild(this.menubar.container);null!=this.menubar&&(this.statusContainer=this.createStatusContainer(),this.editor.addListener("statusChanged",mxUtils.bind(this,function(){this.setStatusText(this.editor.getStatus())})),this.setStatusText(this.editor.getStatus()),this.menubar.container.appendChild(this.statusContainer),this.container.appendChild(this.menubarContainer));
this.sidebar=this.editor.chromeless?null:this.createSidebar(this.sidebarContainer);null!=this.sidebar&&this.container.appendChild(this.sidebarContainer);this.format=this.editor.chromeless||!this.formatEnabled?null:this.createFormat(this.formatContainer);null!=this.format&&this.container.appendChild(this.formatContainer);var b=this.editor.chromeless?null:this.createFooter();null!=b&&(this.footerContainer.appendChild(b),this.container.appendChild(this.footerContainer));null!=this.sidebar&&this.sidebarFooterContainer&&
this.container.appendChild(this.sidebarFooterContainer);this.container.appendChild(this.diagramContainer);null!=this.container&&null!=this.tabContainer&&this.container.appendChild(this.tabContainer);this.toolbar=this.editor.chromeless?null:this.createToolbar(this.createDiv("geToolbar"));null!=this.toolbar&&(this.toolbarContainer.appendChild(this.toolbar.container),this.container.appendChild(this.toolbarContainer));null!=this.sidebar&&(this.container.appendChild(this.hsplit),this.addSplitHandler(this.hsplit,
-!0,0,mxUtils.bind(this,function(e){this.hsplitPosition=e;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var b=document.createElement("a");b.className="geItem geStatus";return b};EditorUi.prototype.setStatusText=function(b){this.statusContainer.innerHTML=b;0==this.statusContainer.getElementsByTagName("div").length&&(this.statusContainer.innerText="",b=this.createStatusDiv(b),this.statusContainer.appendChild(b))};
-EditorUi.prototype.createStatusDiv=function(b){var e=document.createElement("div");e.setAttribute("title",b);e.innerHTML=b;return e};EditorUi.prototype.createToolbar=function(b){return new Toolbar(this,b)};EditorUi.prototype.createSidebar=function(b){return new Sidebar(this,b)};EditorUi.prototype.createFormat=function(b){return new Format(this,b)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};
-EditorUi.prototype.createDiv=function(b){var e=document.createElement("div");e.className=b;return e};
-EditorUi.prototype.addSplitHandler=function(b,e,k,m){function C(g){if(null!=F){var x=new mxPoint(mxEvent.getClientX(g),mxEvent.getClientY(g));m(Math.max(0,L+(e?x.x-F.x:F.y-x.y)-k));mxEvent.consume(g);L!=f()&&(P=!0,d=null)}}function p(g){C(g);F=L=null}var F=null,L=null,P=!0,d=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var f=mxUtils.bind(this,function(){var g=parseInt(e?b.style.left:b.style.bottom);e||(g=g+k-this.footerHeight);return g});mxEvent.addGestureListeners(b,function(g){F=new mxPoint(mxEvent.getClientX(g),
-mxEvent.getClientY(g));L=f();P=!1;mxEvent.consume(g)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(g){if(!P&&this.hsplitClickEnabled){var x=null!=d?d-k:0;d=f();m(x);mxEvent.consume(g)}}));mxEvent.addGestureListeners(document,null,C,p);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,C,p)})};
-EditorUi.prototype.prompt=function(b,e,k){b=new FilenameDialog(this,e,mxResources.get("apply"),function(m){k(parseFloat(m))},b);this.showDialog(b.container,300,80,!0,!0);b.init()};
-EditorUi.prototype.handleError=function(b,e,k,m,C){b=null!=b&&null!=b.error?b.error:b;if(null!=b||null!=e){C=mxUtils.htmlEntities(mxResources.get("unknownError"));var p=mxResources.get("ok");e=null!=e?e:mxResources.get("error");null!=b&&null!=b.message&&(C=mxUtils.htmlEntities(b.message));this.showError(e,C,p,k,null,null,null,null,null,null,null,null,m?k:null)}else null!=k&&k()};
-EditorUi.prototype.showError=function(b,e,k,m,C,p,F,L,P,d,f,g,x){b=new ErrorDialog(this,b,e,k||mxResources.get("ok"),m,C,p,F,g,L,P);e=Math.ceil(null!=e?e.length/50:1);this.showDialog(b.container,d||340,f||100+20*e,!0,!1,x);b.init()};EditorUi.prototype.showDialog=function(b,e,k,m,C,p,F,L,P,d){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,e,k,m,C,p,F,L,P,d);this.dialogs.push(this.dialog)};
-EditorUi.prototype.hideDialog=function(b,e,k){null!=this.dialogs&&0<this.dialogs.length&&(null==k||k==this.dialog.container.firstChild)&&(k=this.dialogs.pop(),0==k.close(b,e)?this.dialogs.push(k):(this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog")),null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?
-this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0)))};EditorUi.prototype.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var e=b.getSelectionCells(),k=new mxDictionary,m=[],C=0;C<e.length;C++){var p=b.isTableCell(e[C])?b.model.getParent(e[C]):e[C];null==p||k.get(p)||(k.put(p,!0),m.push(p))}b.setSelectionCells(b.duplicateCells(m,!1))}catch(F){this.handleError(F)}};
-EditorUi.prototype.pickColor=function(b,e){var k=this.editor.graph,m=k.cellEditor.saveSelection(),C=230+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));b=new ColorDialog(this,mxUtils.rgba2hex(b)||"none",function(p){k.cellEditor.restoreSelection(m);e(p)},function(){k.cellEditor.restoreSelection(m)});this.showDialog(b.container,230,C,!0,!1);b.init()};
+!0,0,mxUtils.bind(this,function(d){this.hsplitPosition=d;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var b=document.createElement("a");b.className="geItem geStatus";return b};EditorUi.prototype.setStatusText=function(b){this.statusContainer.innerHTML=b;0==this.statusContainer.getElementsByTagName("div").length&&(this.statusContainer.innerText="",b=this.createStatusDiv(b),this.statusContainer.appendChild(b))};
+EditorUi.prototype.createStatusDiv=function(b){var d=document.createElement("div");d.setAttribute("title",b);d.innerHTML=b;return d};EditorUi.prototype.createToolbar=function(b){return new Toolbar(this,b)};EditorUi.prototype.createSidebar=function(b){return new Sidebar(this,b)};EditorUi.prototype.createFormat=function(b){return new Format(this,b)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};
+EditorUi.prototype.createDiv=function(b){var d=document.createElement("div");d.className=b;return d};
+EditorUi.prototype.addSplitHandler=function(b,d,g,l){function D(Q){if(null!=E){var e=new mxPoint(mxEvent.getClientX(Q),mxEvent.getClientY(Q));l(Math.max(0,N+(d?e.x-E.x:E.y-e.y)-g));mxEvent.consume(Q);N!=M()&&(R=!0,G=null)}}function p(Q){D(Q);E=N=null}var E=null,N=null,R=!0,G=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var M=mxUtils.bind(this,function(){var Q=parseInt(d?b.style.left:b.style.bottom);d||(Q=Q+g-this.footerHeight);return Q});mxEvent.addGestureListeners(b,function(Q){E=new mxPoint(mxEvent.getClientX(Q),
+mxEvent.getClientY(Q));N=M();R=!1;mxEvent.consume(Q)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(Q){if(!R&&this.hsplitClickEnabled){var e=null!=G?G-g:0;G=M();l(e);mxEvent.consume(Q)}}));mxEvent.addGestureListeners(document,null,D,p);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,D,p)})};
+EditorUi.prototype.prompt=function(b,d,g){b=new FilenameDialog(this,d,mxResources.get("apply"),function(l){g(parseFloat(l))},b);this.showDialog(b.container,300,80,!0,!0);b.init()};
+EditorUi.prototype.handleError=function(b,d,g,l,D){b=null!=b&&null!=b.error?b.error:b;if(null!=b||null!=d){D=mxUtils.htmlEntities(mxResources.get("unknownError"));var p=mxResources.get("ok");d=null!=d?d:mxResources.get("error");null!=b&&null!=b.message&&(D=mxUtils.htmlEntities(b.message));this.showError(d,D,p,g,null,null,null,null,null,null,null,null,l?g:null)}else null!=g&&g()};
+EditorUi.prototype.showError=function(b,d,g,l,D,p,E,N,R,G,M,Q,e){b=new ErrorDialog(this,b,d,g||mxResources.get("ok"),l,D,p,E,Q,N,R);d=Math.ceil(null!=d?d.length/50:1);this.showDialog(b.container,G||340,M||100+20*d,!0,!1,e);b.init()};EditorUi.prototype.showDialog=function(b,d,g,l,D,p,E,N,R,G){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,d,g,l,D,p,E,N,R,G);this.dialogs.push(this.dialog)};
+EditorUi.prototype.hideDialog=function(b,d,g){null!=this.dialogs&&0<this.dialogs.length&&(null==g||g==this.dialog.container.firstChild)&&(g=this.dialogs.pop(),0==g.close(b,d)?this.dialogs.push(g):(this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog")),null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?
+this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0)))};EditorUi.prototype.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var d=b.getSelectionCells(),g=new mxDictionary,l=[],D=0;D<d.length;D++){var p=b.isTableCell(d[D])?b.model.getParent(d[D]):d[D];null==p||g.get(p)||(g.put(p,!0),l.push(p))}b.setSelectionCells(b.duplicateCells(l,!1))}catch(E){this.handleError(E)}};
+EditorUi.prototype.pickColor=function(b,d){var g=this.editor.graph,l=g.cellEditor.saveSelection(),D=230+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));b=new ColorDialog(this,mxUtils.rgba2hex(b)||"none",function(p){g.cellEditor.restoreSelection(l);d(p)},function(){g.cellEditor.restoreSelection(l)});this.showDialog(b.container,230,D,!0,!1);b.init()};
EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(b){this.hideDialog(b)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})};
-EditorUi.prototype.extractGraphModelFromHtml=function(b){var e=null;try{var k=b.indexOf("&lt;mxGraphModel ");if(0<=k){var m=b.lastIndexOf("&lt;/mxGraphModel&gt;");m>k&&(e=b.substring(k,m+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(C){}return e};
-EditorUi.prototype.readGraphModelFromClipboard=function(b){this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(e){null!=e?b(e):this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(k){if(null!=k){var m=decodeURIComponent(k);this.isCompatibleString(m)&&(k=m)}b(k)}),"text")}),"html")};
-EditorUi.prototype.readGraphModelFromClipboardWithType=function(b,e){navigator.clipboard.read().then(mxUtils.bind(this,function(k){if(null!=k&&0<k.length&&"html"==e&&0<=mxUtils.indexOf(k[0].types,"text/html"))k[0].getType("text/html").then(mxUtils.bind(this,function(m){m.text().then(mxUtils.bind(this,function(C){try{var p=this.parseHtmlData(C),F="text/plain"!=p.getAttribute("data-type")?p.innerHTML:mxUtils.trim(null==p.innerText?mxUtils.getTextContent(p):p.innerText);try{var L=F.lastIndexOf("%3E");
-0<=L&&L<F.length-3&&(F=F.substring(0,L+3))}catch(f){}try{var P=p.getElementsByTagName("span"),d=null!=P&&0<P.length?mxUtils.trim(decodeURIComponent(P[0].textContent)):decodeURIComponent(F);this.isCompatibleString(d)&&(F=d)}catch(f){}}catch(f){}b(this.isCompatibleString(F)?F:null)}))["catch"](function(C){b(null)})}))["catch"](function(m){b(null)});else if(null!=k&&0<k.length&&"text"==e&&0<=mxUtils.indexOf(k[0].types,"text/plain"))k[0].getType("text/plain").then(function(m){m.text().then(function(C){b(C)})["catch"](function(){b(null)})})["catch"](function(){b(null)});
-else b(null)}))["catch"](function(k){b(null)})};
-EditorUi.prototype.parseHtmlData=function(b){var e=null;if(null!=b&&0<b.length){var k="<meta "==b.substring(0,6);e=document.createElement("div");e.innerHTML=(k?'<meta charset="utf-8">':"")+this.editor.graph.sanitizeHtml(b);asHtml=!0;b=e.getElementsByTagName("style");if(null!=b)for(;0<b.length;)b[0].parentNode.removeChild(b[0]);null!=e.firstChild&&e.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=e.firstChild.nextSibling&&e.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==
-e.firstChild.nodeName&&"A"==e.firstChild.nextSibling.nodeName&&null==e.firstChild.nextSibling.nextSibling&&(b=null==e.firstChild.nextSibling.innerText?mxUtils.getTextContent(e.firstChild.nextSibling):e.firstChild.nextSibling.innerText,b==e.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(e,b),asHtml=!1));k=k&&null!=e.firstChild?e.firstChild.nextSibling:e.firstChild;null!=k&&null==k.nextSibling&&k.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==k.nodeName?(b=k.getAttribute("src"),
-null!=b&&(Editor.isPngDataUrl(b)&&(k=Editor.extractGraphModelFromPng(b),null!=k&&0<k.length&&(b=k)),mxUtils.setTextContent(e,b),asHtml=!1)):(k=e.getElementsByTagName("img"),1==k.length&&(k=k[0],b=k.getAttribute("src"),null!=b&&k.parentNode==e&&1==e.children.length&&(Editor.isPngDataUrl(b)&&(k=Editor.extractGraphModelFromPng(b),null!=k&&0<k.length&&(b=k)),mxUtils.setTextContent(e,b),asHtml=!1)));asHtml&&Graph.removePasteFormatting(e)}asHtml||e.setAttribute("data-type","text/plain");return e};
-EditorUi.prototype.extractGraphModelFromEvent=function(b){var e=null,k=null;null!=b&&(b=null!=b.dataTransfer?b.dataTransfer:b.clipboardData,null!=b&&(10==document.documentMode||11==document.documentMode?k=b.getData("Text"):(k=0<=mxUtils.indexOf(b.types,"text/html")?b.getData("text/html"):null,0<=mxUtils.indexOf(b.types,"text/plain")&&(null==k||0==k.length)&&(k=b.getData("text/plain"))),null!=k&&(k=Graph.zapGremlins(mxUtils.trim(k)),b=this.extractGraphModelFromHtml(k),null!=b&&(k=b))));null!=k&&this.isCompatibleString(k)&&
-(e=k);return e};EditorUi.prototype.isCompatibleString=function(b){return!1};EditorUi.prototype.saveFile=function(b){b||null==this.editor.filename?(b=new FilenameDialog(this,this.editor.getOrCreateFilename(),mxResources.get("save"),mxUtils.bind(this,function(e){this.save(e)}),null,mxUtils.bind(this,function(e){if(null!=e&&0<e.length)return!0;mxUtils.confirm(mxResources.get("invalidName"));return!1})),this.showDialog(b.container,300,100,!0,!0),b.init()):this.save(this.editor.getOrCreateFilename())};
-EditorUi.prototype.save=function(b){if(null!=b){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var e=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(b)&&!mxUtils.confirm(mxResources.get("replaceIt",[b])))return;localStorage.setItem(b,e);this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}else if(e.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&xml="+encodeURIComponent(e))).simulate(document,
-"_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(e);return}this.editor.setModified(!1);this.editor.setFilename(b);this.updateDocumentTitle()}catch(k){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}};
-EditorUi.prototype.executeLayouts=function(b,e){this.executeLayout(mxUtils.bind(this,function(){var k=new mxCompositeLayout(this.editor.graph,b),m=this.editor.graph.getSelectionCells();k.execute(this.editor.graph.getDefaultParent(),0==m.length?null:m)}),!0,e)};
-EditorUi.prototype.executeLayout=function(b,e,k){var m=this.editor.graph;m.getModel().beginUpdate();try{b()}catch(C){throw C;}finally{this.allowAnimation&&e&&m.isEnabled()?(b=new mxMorphing(m),b.addListener(mxEvent.DONE,mxUtils.bind(this,function(){m.getModel().endUpdate();null!=k&&k()})),b.startAnimation()):(m.getModel().endUpdate(),null!=k&&k())}};
-EditorUi.prototype.showImageDialog=function(b,e,k,m){m=this.editor.graph.cellEditor;var C=m.saveSelection(),p=mxUtils.prompt(b,e);m.restoreSelection(C);if(null!=p&&0<p.length){var F=new Image;F.onload=function(){k(p,F.width,F.height)};F.onerror=function(){k(null);mxUtils.alert(mxResources.get("fileNotFound"))};F.src=p}else k(null)};EditorUi.prototype.showLinkDialog=function(b,e,k){b=new LinkDialog(this,b,e,k);this.showDialog(b.container,420,90,!0,!0);b.init()};
+EditorUi.prototype.extractGraphModelFromHtml=function(b){var d=null;try{var g=b.indexOf("&lt;mxGraphModel ");if(0<=g){var l=b.lastIndexOf("&lt;/mxGraphModel&gt;");l>g&&(d=b.substring(g,l+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(D){}return d};
+EditorUi.prototype.readGraphModelFromClipboard=function(b){this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(d){null!=d?b(d):this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(g){if(null!=g){var l=decodeURIComponent(g);this.isCompatibleString(l)&&(g=l)}b(g)}),"text")}),"html")};
+EditorUi.prototype.readGraphModelFromClipboardWithType=function(b,d){navigator.clipboard.read().then(mxUtils.bind(this,function(g){if(null!=g&&0<g.length&&"html"==d&&0<=mxUtils.indexOf(g[0].types,"text/html"))g[0].getType("text/html").then(mxUtils.bind(this,function(l){l.text().then(mxUtils.bind(this,function(D){try{var p=this.parseHtmlData(D),E="text/plain"!=p.getAttribute("data-type")?p.innerHTML:mxUtils.trim(null==p.innerText?mxUtils.getTextContent(p):p.innerText);try{var N=E.lastIndexOf("%3E");
+0<=N&&N<E.length-3&&(E=E.substring(0,N+3))}catch(M){}try{var R=p.getElementsByTagName("span"),G=null!=R&&0<R.length?mxUtils.trim(decodeURIComponent(R[0].textContent)):decodeURIComponent(E);this.isCompatibleString(G)&&(E=G)}catch(M){}}catch(M){}b(this.isCompatibleString(E)?E:null)}))["catch"](function(D){b(null)})}))["catch"](function(l){b(null)});else if(null!=g&&0<g.length&&"text"==d&&0<=mxUtils.indexOf(g[0].types,"text/plain"))g[0].getType("text/plain").then(function(l){l.text().then(function(D){b(D)})["catch"](function(){b(null)})})["catch"](function(){b(null)});
+else b(null)}))["catch"](function(g){b(null)})};
+EditorUi.prototype.parseHtmlData=function(b){var d=null;if(null!=b&&0<b.length){var g="<meta "==b.substring(0,6);d=document.createElement("div");d.innerHTML=(g?'<meta charset="utf-8">':"")+this.editor.graph.sanitizeHtml(b);asHtml=!0;b=d.getElementsByTagName("style");if(null!=b)for(;0<b.length;)b[0].parentNode.removeChild(b[0]);null!=d.firstChild&&d.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=d.firstChild.nextSibling&&d.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==
+d.firstChild.nodeName&&"A"==d.firstChild.nextSibling.nodeName&&null==d.firstChild.nextSibling.nextSibling&&(b=null==d.firstChild.nextSibling.innerText?mxUtils.getTextContent(d.firstChild.nextSibling):d.firstChild.nextSibling.innerText,b==d.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(d,b),asHtml=!1));g=g&&null!=d.firstChild?d.firstChild.nextSibling:d.firstChild;null!=g&&null==g.nextSibling&&g.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==g.nodeName?(b=g.getAttribute("src"),
+null!=b&&(Editor.isPngDataUrl(b)&&(g=Editor.extractGraphModelFromPng(b),null!=g&&0<g.length&&(b=g)),mxUtils.setTextContent(d,b),asHtml=!1)):(g=d.getElementsByTagName("img"),1==g.length&&(g=g[0],b=g.getAttribute("src"),null!=b&&g.parentNode==d&&1==d.children.length&&(Editor.isPngDataUrl(b)&&(g=Editor.extractGraphModelFromPng(b),null!=g&&0<g.length&&(b=g)),mxUtils.setTextContent(d,b),asHtml=!1)));asHtml&&Graph.removePasteFormatting(d)}asHtml||d.setAttribute("data-type","text/plain");return d};
+EditorUi.prototype.extractGraphModelFromEvent=function(b){var d=null,g=null;null!=b&&(b=null!=b.dataTransfer?b.dataTransfer:b.clipboardData,null!=b&&(10==document.documentMode||11==document.documentMode?g=b.getData("Text"):(g=0<=mxUtils.indexOf(b.types,"text/html")?b.getData("text/html"):null,0<=mxUtils.indexOf(b.types,"text/plain")&&(null==g||0==g.length)&&(g=b.getData("text/plain"))),null!=g&&(g=Graph.zapGremlins(mxUtils.trim(g)),b=this.extractGraphModelFromHtml(g),null!=b&&(g=b))));null!=g&&this.isCompatibleString(g)&&
+(d=g);return d};EditorUi.prototype.isCompatibleString=function(b){return!1};EditorUi.prototype.saveFile=function(b){b||null==this.editor.filename?(b=new FilenameDialog(this,this.editor.getOrCreateFilename(),mxResources.get("save"),mxUtils.bind(this,function(d){this.save(d)}),null,mxUtils.bind(this,function(d){if(null!=d&&0<d.length)return!0;mxUtils.confirm(mxResources.get("invalidName"));return!1})),this.showDialog(b.container,300,100,!0,!0),b.init()):this.save(this.editor.getOrCreateFilename())};
+EditorUi.prototype.save=function(b){if(null!=b){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var d=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(b)&&!mxUtils.confirm(mxResources.get("replaceIt",[b])))return;localStorage.setItem(b,d);this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}else if(d.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&xml="+encodeURIComponent(d))).simulate(document,
+"_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(d);return}this.editor.setModified(!1);this.editor.setFilename(b);this.updateDocumentTitle()}catch(g){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}};
+EditorUi.prototype.executeLayouts=function(b,d){this.executeLayout(mxUtils.bind(this,function(){var g=new mxCompositeLayout(this.editor.graph,b),l=this.editor.graph.getSelectionCells();g.execute(this.editor.graph.getDefaultParent(),0==l.length?null:l)}),!0,d)};
+EditorUi.prototype.executeLayout=function(b,d,g){var l=this.editor.graph;l.getModel().beginUpdate();try{b()}catch(D){throw D;}finally{this.allowAnimation&&d&&l.isEnabled()?(b=new mxMorphing(l),b.addListener(mxEvent.DONE,mxUtils.bind(this,function(){l.getModel().endUpdate();null!=g&&g()})),b.startAnimation()):(l.getModel().endUpdate(),null!=g&&g())}};
+EditorUi.prototype.showImageDialog=function(b,d,g,l){l=this.editor.graph.cellEditor;var D=l.saveSelection(),p=mxUtils.prompt(b,d);l.restoreSelection(D);if(null!=p&&0<p.length){var E=new Image;E.onload=function(){g(p,E.width,E.height)};E.onerror=function(){g(null);mxUtils.alert(mxResources.get("fileNotFound"))};E.src=p}else g(null)};EditorUi.prototype.showLinkDialog=function(b,d,g){b=new LinkDialog(this,b,d,g);this.showDialog(b.container,420,90,!0,!0);b.init()};
EditorUi.prototype.showDataDialog=function(b){null!=b&&(b=new EditDataDialog(this,b),this.showDialog(b.container,480,420,!0,!1,null,!1),b.init())};
-EditorUi.prototype.showBackgroundImageDialog=function(b,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 k=mxUtils.prompt(mxResources.get("backgroundImage"),null!=e?e.src:"");null!=k&&0<k.length?(e=new Image,e.onload=function(){b(new mxImage(k,e.width,e.height),!1)},e.onerror=function(){b(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},e.src=k):b(null)};
-EditorUi.prototype.setBackgroundImage=function(b){this.editor.graph.setBackgroundImage(b);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(b,e,k){mxUtils.confirm(b)?null!=e&&e():null!=k&&k()};EditorUi.prototype.createOutline=function(b){var e=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){e.update(!1)});return e};
+EditorUi.prototype.showBackgroundImageDialog=function(b,d){b=null!=b?b:mxUtils.bind(this,function(l){l=new ChangePageSetup(this,null,l);l.ignoreColor=!0;this.editor.graph.model.execute(l)});var g=mxUtils.prompt(mxResources.get("backgroundImage"),null!=d?d.src:"");null!=g&&0<g.length?(d=new Image,d.onload=function(){b(new mxImage(g,d.width,d.height),!1)},d.onerror=function(){b(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},d.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,d,g){mxUtils.confirm(b)?null!=d&&d():null!=g&&g()};EditorUi.prototype.createOutline=function(b){var d=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){d.update(!1)});return d};
EditorUi.prototype.altShiftActions={67:"clearWaypoints",65:"connectionArrows",76:"editLink",80:"connectionPoints",84:"editTooltip",86:"pasteSize",88:"copySize",66:"copyData",69:"pasteData"};
-EditorUi.prototype.createKeyHandler=function(b){function e(g,x,y){if(!m.isSelectionEmpty()&&m.isEnabled()){x=null!=x?x:1;var t=m.getCompositeParents(m.getSelectionCells()),G=0<t.length?t[0]:null;if(null!=G)if(y){m.getModel().beginUpdate();try{for(G=0;G<t.length;G++)if(m.getModel().isVertex(t[G])&&m.isCellResizable(t[G])){var D=m.getCellGeometry(t[G]);null!=D&&(D=D.clone(),37==g?D.width=Math.max(0,D.width-x):38==g?D.height=Math.max(0,D.height-x):39==g?D.width+=x:40==g&&(D.height+=x),m.getModel().setGeometry(t[G],
-D))}}finally{m.getModel().endUpdate()}}else{D=m.model.getParent(G);var I=m.getView().scale;y=null;1==m.getSelectionCount()&&m.model.isVertex(G)&&null!=m.layoutManager&&!m.isCellLocked(G)&&(y=m.layoutManager.getLayout(D));if(null!=y&&y.constructor==mxStackLayout)x=D.getIndex(G),37==g||38==g?m.model.add(D,G,Math.max(0,x-1)):(39==g||40==g)&&m.model.add(D,G,Math.min(m.model.getChildCount(D),x+1));else{var H=m.graphHandler;null!=H&&(null==H.first&&H.start(G,0,0,t),null!=H.first&&(G=t=0,37==g?t=-x:38==
-g?G=-x:39==g?t=x:40==g&&(G=x),H.currentDx+=t*I,H.currentDy+=G*I,H.checkPreview(),H.updatePreview()),null!=F&&window.clearTimeout(F),F=window.setTimeout(function(){if(null!=H.first){var S=H.roundLength(H.currentDx/I),T=H.roundLength(H.currentDy/I);H.moveCells(H.cells,S,T);H.reset()}},400))}}}}var k=this,m=this.editor.graph,C=new mxKeyHandler(m),p=C.isEventIgnored;C.isEventIgnored=function(g){return!(mxEvent.isShiftDown(g)&&9==g.keyCode)&&(!this.isControlDown(g)||mxEvent.isShiftDown(g)||90!=g.keyCode&&
-89!=g.keyCode&&188!=g.keyCode&&190!=g.keyCode&&85!=g.keyCode)&&(66!=g.keyCode&&73!=g.keyCode||!this.isControlDown(g)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&p.apply(this,arguments)};C.isEnabledForEvent=function(g){return!mxEvent.isConsumed(g)&&this.isGraphEvent(g)&&this.isEnabled()&&(null==k.dialogs||0==k.dialogs.length)};C.isControlDown=function(g){return mxEvent.isControlDown(g)||mxClient.IS_MAC&&g.metaKey};var F=null,L={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,
-39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},P=C.getFunction;mxKeyHandler.prototype.getFunction=function(g){if(m.isEnabled()){if(mxEvent.isShiftDown(g)&&mxEvent.isAltDown(g)){var x=k.actions.get(k.altShiftActions[g.keyCode]);if(null!=x)return x.funct}if(null!=L[g.keyCode]&&!m.isSelectionEmpty())if(!this.isControlDown(g)&&mxEvent.isShiftDown(g)&&mxEvent.isAltDown(g)){if(m.model.isVertex(m.getSelectionCell()))return function(){var y=m.connectVertex(m.getSelectionCell(),L[g.keyCode],
-m.defaultEdgeLength,g,!0);null!=y&&0<y.length&&(1==y.length&&m.model.isEdge(y[0])?m.setSelectionCell(m.model.getTerminal(y[0],!1)):m.setSelectionCell(y[y.length-1]),m.scrollCellToVisible(m.getSelectionCell()),null!=k.hoverIcons&&k.hoverIcons.update(m.view.getState(m.getSelectionCell())))}}else return this.isControlDown(g)?function(){e(g.keyCode,mxEvent.isShiftDown(g)?m.gridSize:null,!0)}:function(){e(g.keyCode,mxEvent.isShiftDown(g)?m.gridSize:null)}}return P.apply(this,arguments)};C.bindAction=mxUtils.bind(this,
-function(g,x,y,t){var G=this.actions.get(y);null!=G&&(y=function(){G.isEnabled()&&G.funct.apply(this,arguments)},x?t?C.bindControlShiftKey(g,y):C.bindControlKey(g,y):t?C.bindShiftKey(g,y):C.bindKey(g,y))});var d=this,f=C.escape;C.escape=function(g){f.apply(this,arguments)};C.enter=function(){};C.bindControlShiftKey(36,function(){m.exitGroup()});C.bindControlShiftKey(35,function(){m.enterGroup()});C.bindShiftKey(36,function(){m.home()});C.bindKey(35,function(){m.refresh()});C.bindAction(107,!0,"zoomIn");
-C.bindAction(109,!0,"zoomOut");C.bindAction(80,!0,"print");C.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)C.bindControlKey(36,function(){m.isEnabled()&&m.foldCells(!0)}),C.bindControlKey(35,function(){m.isEnabled()&&m.foldCells(!1)}),C.bindControlKey(13,function(){d.ctrlEnter()}),C.bindAction(8,!1,"delete"),C.bindAction(8,!0,"deleteAll"),C.bindAction(8,!1,"deleteLabels",!0),C.bindAction(46,!1,"delete"),C.bindAction(46,!0,"deleteAll"),C.bindAction(46,!1,"deleteLabels",
-!0),C.bindAction(36,!1,"resetView"),C.bindAction(72,!0,"fitWindow",!0),C.bindAction(74,!0,"fitPage"),C.bindAction(74,!0,"fitTwoPages",!0),C.bindAction(48,!0,"customZoom"),C.bindAction(82,!0,"turn"),C.bindAction(82,!0,"clearDefaultStyle",!0),C.bindAction(83,!0,"save"),C.bindAction(83,!0,"saveAs",!0),C.bindAction(65,!0,"selectAll"),C.bindAction(65,!0,"selectNone",!0),C.bindAction(73,!0,"selectVertices",!0),C.bindAction(69,!0,"selectEdges",!0),C.bindAction(69,!0,"editStyle"),C.bindAction(66,!0,"bold"),
-C.bindAction(66,!0,"toBack",!0),C.bindAction(70,!0,"toFront",!0),C.bindAction(68,!0,"duplicate"),C.bindAction(68,!0,"setAsDefaultStyle",!0),C.bindAction(90,!0,"undo"),C.bindAction(89,!0,"autosize",!0),C.bindAction(88,!0,"cut"),C.bindAction(67,!0,"copy"),C.bindAction(86,!0,"paste"),C.bindAction(71,!0,"group"),C.bindAction(77,!0,"editData"),C.bindAction(71,!0,"grid",!0),C.bindAction(73,!0,"italic"),C.bindAction(76,!0,"lockUnlock"),C.bindAction(76,!0,"layers",!0),C.bindAction(80,!0,"formatPanel",!0),
-C.bindAction(85,!0,"underline"),C.bindAction(85,!0,"ungroup",!0),C.bindAction(190,!0,"superscript"),C.bindAction(188,!0,"subscript"),C.bindAction(13,!1,"keyPressEnter"),C.bindKey(113,function(){m.isEnabled()&&m.startEditingAtCell()});mxClient.IS_WIN?C.bindAction(89,!0,"redo"):C.bindAction(90,!0,"redo",!0);return C};
+EditorUi.prototype.createKeyHandler=function(b){function d(Q,e,f){if(!l.isSelectionEmpty()&&l.isEnabled()){e=null!=e?e:1;var k=l.getCompositeParents(l.getSelectionCells()),z=0<k.length?k[0]:null;if(null!=z)if(f){l.getModel().beginUpdate();try{for(z=0;z<k.length;z++)if(l.getModel().isVertex(k[z])&&l.isCellResizable(k[z])){var t=l.getCellGeometry(k[z]);null!=t&&(t=t.clone(),37==Q?t.width=Math.max(0,t.width-e):38==Q?t.height=Math.max(0,t.height-e):39==Q?t.width+=e:40==Q&&(t.height+=e),l.getModel().setGeometry(k[z],
+t))}}finally{l.getModel().endUpdate()}}else{t=l.model.getParent(z);var B=l.getView().scale;f=null;1==l.getSelectionCount()&&l.model.isVertex(z)&&null!=l.layoutManager&&!l.isCellLocked(z)&&(f=l.layoutManager.getLayout(t));if(null!=f&&f.constructor==mxStackLayout)e=t.getIndex(z),37==Q||38==Q?l.model.add(t,z,Math.max(0,e-1)):(39==Q||40==Q)&&l.model.add(t,z,Math.min(l.model.getChildCount(t),e+1));else{var I=l.graphHandler;null!=I&&(null==I.first&&I.start(z,0,0,k),null!=I.first&&(z=k=0,37==Q?k=-e:38==
+Q?z=-e:39==Q?k=e:40==Q&&(z=e),I.currentDx+=k*B,I.currentDy+=z*B,I.checkPreview(),I.updatePreview()),null!=E&&window.clearTimeout(E),E=window.setTimeout(function(){if(null!=I.first){var O=I.roundLength(I.currentDx/B),J=I.roundLength(I.currentDy/B);I.moveCells(I.cells,O,J);I.reset()}},400))}}}}var g=this,l=this.editor.graph,D=new mxKeyHandler(l),p=D.isEventIgnored;D.isEventIgnored=function(Q){return!(mxEvent.isShiftDown(Q)&&9==Q.keyCode)&&(!this.isControlDown(Q)||mxEvent.isShiftDown(Q)||90!=Q.keyCode&&
+89!=Q.keyCode&&188!=Q.keyCode&&190!=Q.keyCode&&85!=Q.keyCode)&&(66!=Q.keyCode&&73!=Q.keyCode||!this.isControlDown(Q)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&p.apply(this,arguments)};D.isEnabledForEvent=function(Q){return!mxEvent.isConsumed(Q)&&this.isGraphEvent(Q)&&this.isEnabled()&&(null==g.dialogs||0==g.dialogs.length)};D.isControlDown=function(Q){return mxEvent.isControlDown(Q)||mxClient.IS_MAC&&Q.metaKey};var E=null,N={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,
+39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},R=D.getFunction;mxKeyHandler.prototype.getFunction=function(Q){if(l.isEnabled()){if(mxEvent.isShiftDown(Q)&&mxEvent.isAltDown(Q)){var e=g.actions.get(g.altShiftActions[Q.keyCode]);if(null!=e)return e.funct}if(null!=N[Q.keyCode]&&!l.isSelectionEmpty())if(!this.isControlDown(Q)&&mxEvent.isShiftDown(Q)&&mxEvent.isAltDown(Q)){if(l.model.isVertex(l.getSelectionCell()))return function(){var f=l.connectVertex(l.getSelectionCell(),N[Q.keyCode],
+l.defaultEdgeLength,Q,!0);null!=f&&0<f.length&&(1==f.length&&l.model.isEdge(f[0])?l.setSelectionCell(l.model.getTerminal(f[0],!1)):l.setSelectionCell(f[f.length-1]),l.scrollCellToVisible(l.getSelectionCell()),null!=g.hoverIcons&&g.hoverIcons.update(l.view.getState(l.getSelectionCell())))}}else return this.isControlDown(Q)?function(){d(Q.keyCode,mxEvent.isShiftDown(Q)?l.gridSize:null,!0)}:function(){d(Q.keyCode,mxEvent.isShiftDown(Q)?l.gridSize:null)}}return R.apply(this,arguments)};D.bindAction=mxUtils.bind(this,
+function(Q,e,f,k){var z=this.actions.get(f);null!=z&&(f=function(){z.isEnabled()&&z.funct.apply(this,arguments)},e?k?D.bindControlShiftKey(Q,f):D.bindControlKey(Q,f):k?D.bindShiftKey(Q,f):D.bindKey(Q,f))});var G=this,M=D.escape;D.escape=function(Q){M.apply(this,arguments)};D.enter=function(){};D.bindControlShiftKey(36,function(){l.exitGroup()});D.bindControlShiftKey(35,function(){l.enterGroup()});D.bindShiftKey(36,function(){l.home()});D.bindKey(35,function(){l.refresh()});D.bindAction(107,!0,"zoomIn");
+D.bindAction(109,!0,"zoomOut");D.bindAction(80,!0,"print");D.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)D.bindControlKey(36,function(){l.isEnabled()&&l.foldCells(!0)}),D.bindControlKey(35,function(){l.isEnabled()&&l.foldCells(!1)}),D.bindControlKey(13,function(){G.ctrlEnter()}),D.bindAction(8,!1,"delete"),D.bindAction(8,!0,"deleteAll"),D.bindAction(8,!1,"deleteLabels",!0),D.bindAction(46,!1,"delete"),D.bindAction(46,!0,"deleteAll"),D.bindAction(46,!1,"deleteLabels",
+!0),D.bindAction(36,!1,"resetView"),D.bindAction(72,!0,"fitWindow",!0),D.bindAction(74,!0,"fitPage"),D.bindAction(74,!0,"fitTwoPages",!0),D.bindAction(48,!0,"customZoom"),D.bindAction(82,!0,"turn"),D.bindAction(82,!0,"clearDefaultStyle",!0),D.bindAction(83,!0,"save"),D.bindAction(83,!0,"saveAs",!0),D.bindAction(65,!0,"selectAll"),D.bindAction(65,!0,"selectNone",!0),D.bindAction(73,!0,"selectVertices",!0),D.bindAction(69,!0,"selectEdges",!0),D.bindAction(69,!0,"editStyle"),D.bindAction(66,!0,"bold"),
+D.bindAction(66,!0,"toBack",!0),D.bindAction(70,!0,"toFront",!0),D.bindAction(68,!0,"duplicate"),D.bindAction(68,!0,"setAsDefaultStyle",!0),D.bindAction(90,!0,"undo"),D.bindAction(89,!0,"autosize",!0),D.bindAction(88,!0,"cut"),D.bindAction(67,!0,"copy"),D.bindAction(86,!0,"paste"),D.bindAction(71,!0,"group"),D.bindAction(77,!0,"editData"),D.bindAction(71,!0,"grid",!0),D.bindAction(73,!0,"italic"),D.bindAction(76,!0,"lockUnlock"),D.bindAction(76,!0,"layers",!0),D.bindAction(80,!0,"format",!0),D.bindAction(85,
+!0,"underline"),D.bindAction(85,!0,"ungroup",!0),D.bindAction(190,!0,"superscript"),D.bindAction(188,!0,"subscript"),D.bindAction(13,!1,"keyPressEnter"),D.bindKey(113,function(){l.isEnabled()&&l.startEditingAtCell()});mxClient.IS_WIN?D.bindAction(89,!0,"redo"):D.bindAction(90,!0,"redo",!0);return D};
EditorUi.prototype.destroy=function(){var b=this.editor.graph;null!=b&&null!=this.selectionStateListener&&(b.getSelectionModel().removeListener(mxEvent.CHANGE,this.selectionStateListener),b.getModel().removeListener(mxEvent.CHANGE,this.selectionStateListener),b.removeListener(mxEvent.EDITING_STARTED,this.selectionStateListener),b.removeListener(mxEvent.EDITING_STOPPED,this.selectionStateListener),b.getView().removeListener("unitChanged",this.selectionStateListener),this.selectionStateListener=null);
null!=this.editor&&(this.editor.destroy(),this.editor=null);null!=this.menubar&&(this.menubar.destroy(),this.menubar=null);null!=this.toolbar&&(this.toolbar.destroy(),this.toolbar=null);null!=this.sidebar&&(this.sidebar.destroy(),this.sidebar=null);null!=this.keyHandler&&(this.keyHandler.destroy(),this.keyHandler=null);null!=this.keydownHandler&&(mxEvent.removeListener(document,"keydown",this.keydownHandler),this.keydownHandler=null);null!=this.keyupHandler&&(mxEvent.removeListener(document,"keyup",
this.keyupHandler),this.keyupHandler=null);null!=this.resizeHandler&&(mxEvent.removeListener(window,"resize",this.resizeHandler),this.resizeHandler=null);null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null);null!=this.orientationChangeHandler&&(mxEvent.removeListener(window,"orientationchange",this.orientationChangeHandler),this.orientationChangeHandler=null);null!=this.scrollHandler&&(mxEvent.removeListener(window,"scroll",this.scrollHandler),
-this.scrollHandler=null);if(null!=this.destroyFunctions){for(b=0;b<this.destroyFunctions.length;b++)this.destroyFunctions[b]();this.destroyFunctions=null}var e=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.sidebarFooterContainer,this.layersDialog];for(b=0;b<e.length;b++)null!=e[b]&&null!=e[b].parentNode&&e[b].parentNode.removeChild(e[b])};(function(){var b=[["nbsp","160"],["shy","173"]],e=mxUtils.parseXml;mxUtils.parseXml=function(k){for(var m=0;m<b.length;m++)k=k.replace(new RegExp("&"+b[m][0]+";","g"),"&#"+b[m][1]+";");return e(k)}})();
-Date.prototype.toISOString||function(){function b(e){e=String(e);1===e.length&&(e="0"+e);return e}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+b(this.getUTCMonth()+1)+"-"+b(this.getUTCDate())+"T"+b(this.getUTCHours())+":"+b(this.getUTCMinutes())+":"+b(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()});
-Uint8Array.from||(Uint8Array.from=function(){var b=Object.prototype.toString,e=function(m){return"function"===typeof m||"[object Function]"===b.call(m)},k=Math.pow(2,53)-1;return function(m){var C=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,F;if("undefined"!==typeof p){if(!e(p))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(F=
-arguments[2])}var L=Number(C.length);L=isNaN(L)?0:0!==L&&isFinite(L)?(0<L?1:-1)*Math.floor(Math.abs(L)):L;L=Math.min(Math.max(L,0),k);for(var P=e(this)?Object(new this(L)):Array(L),d=0,f;d<L;)f=C[d],P[d]=p?"undefined"===typeof F?p(f,d):p.call(F,f,d):f,d+=1;P.length=L;return P}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.METERS=4;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";
+this.scrollHandler=null);if(null!=this.destroyFunctions){for(b=0;b<this.destroyFunctions.length;b++)this.destroyFunctions[b]();this.destroyFunctions=null}var d=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.sidebarFooterContainer,this.layersDialog];for(b=0;b<d.length;b++)null!=d[b]&&null!=d[b].parentNode&&d[b].parentNode.removeChild(d[b])};(function(){var b=[["nbsp","160"],["shy","173"]],d=mxUtils.parseXml;mxUtils.parseXml=function(g){for(var l=0;l<b.length;l++)g=g.replace(new RegExp("&"+b[l][0]+";","g"),"&#"+b[l][1]+";");return d(g)}})();
+Date.prototype.toISOString||function(){function b(d){d=String(d);1===d.length&&(d="0"+d);return d}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+b(this.getUTCMonth()+1)+"-"+b(this.getUTCDate())+"T"+b(this.getUTCHours())+":"+b(this.getUTCMinutes())+":"+b(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()});
+Uint8Array.from||(Uint8Array.from=function(){var b=Object.prototype.toString,d=function(l){return"function"===typeof l||"[object Function]"===b.call(l)},g=Math.pow(2,53)-1;return function(l){var D=Object(l);if(null==l)throw new TypeError("Array.from requires an array-like object - not null or undefined");var p=1<arguments.length?arguments[1]:void 0,E;if("undefined"!==typeof p){if(!d(p))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(E=
+arguments[2])}var N=Number(D.length);N=isNaN(N)?0:0!==N&&isFinite(N)?(0<N?1:-1)*Math.floor(Math.abs(N)):N;N=Math.min(Math.max(N,0),g);for(var R=d(this)?Object(new this(N)):Array(N),G=0,M;G<N;)M=D[G],R[G]=p?"undefined"===typeof E?p(M,G):p.call(E,M,G):M,G+=1;R.length=N;return R}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.METERS=4;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";
mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxCodec.allowlist="mxStylesheet Array mxGraphModel mxCell mxGeometry mxRectangle mxPoint mxChildChange mxRootChange mxTerminalChange mxValueChange mxStyleChange mxGeometryChange mxCollapseChange mxVisibleChange mxCellAttributeChange".split(" ");mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1;
-(function(){try{if(null!=navigator&&null!=navigator.language){var b=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===b||"en-ca"===b||"es-mx"===b?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(e){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;
+(function(){try{if(null!=navigator&&null!=navigator.language){var b=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===b||"en-ca"===b||"es-mx"===b?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(d){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;
mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.defaultGridColor="#d0d0d0";mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultGridColor;mxGraphView.prototype.unit=mxConstants.POINTS;
-mxGraphView.prototype.setUnit=function(b){this.unit!=b&&(this.unit=b,this.fireEvent(new mxEventObject("unitChanged","unit",b)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(b,e,k){return null};
+mxGraphView.prototype.setUnit=function(b){this.unit!=b&&(this.unit=b,this.fireEvent(new mxEventObject("unitChanged","unit",b)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(b,d,g){return null};
mxImageShape.prototype.getImageDataUri=function(){var b=this.image;if("data:image/svg+xml;base64,"==b.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=b)this.clippedSvg=Graph.clipSvgDataUri(b,!0),this.clippedImage=b;b=this.clippedSvg}return b};
-Graph=function(b,e,k,m,C,p){mxGraph.call(this,b,e,k,m);this.themes=C||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=p?p:!1;b=this.baseUrl;e=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<e&&(e=b.indexOf("/",e+2),0<e&&(this.domainUrl=b.substring(0,e)),e=b.lastIndexOf("/"),0<e&&(this.domainPathUrl=b.substring(0,e+1)));this.isHtmlLabel=function(N){N=this.getCurrentCellStyle(N);
-return null!=N?"1"==N.html||"wrap"==N[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var F=null,L=null,P=null,d=null,f=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(N,aa){if("mouseDown"==aa.getProperty("eventName")&&this.isEnabled()){N=aa.getProperty("event");var V=N.getState();aa=this.view.scale;if(!mxEvent.isAltDown(N.getEvent())&&null!=V)if(this.model.isEdge(V.cell))if(F=new mxPoint(N.getGraphX(),N.getGraphY()),f=this.isCellSelected(V.cell),P=V,L=N,null!=V.text&&
-null!=V.text.boundingBox&&mxUtils.contains(V.text.boundingBox,N.getGraphX(),N.getGraphY()))d=mxEvent.LABEL_HANDLE;else{var ha=this.selectionCellsHandler.getHandler(V.cell);null!=ha&&null!=ha.bends&&0<ha.bends.length&&(d=ha.getHandleForEvent(N))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(N.getEvent())&&(ha=this.selectionCellsHandler.getHandler(V.cell),null==ha||null==ha.getHandleForEvent(N))){var X=new mxRectangle(N.getGraphX()-1,N.getGraphY()-1),ia=mxEvent.isTouchEvent(N.getEvent())?
-mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;ha=ia+2;X.grow(ia);if(this.isTableCell(V.cell)&&!this.isCellSelected(V.cell)&&!(mxUtils.contains(V,N.getGraphX()-ha,N.getGraphY()-ha)&&mxUtils.contains(V,N.getGraphX()-ha,N.getGraphY()+ha)&&mxUtils.contains(V,N.getGraphX()+ha,N.getGraphY()+ha)&&mxUtils.contains(V,N.getGraphX()+ha,N.getGraphY()-ha))){var q=this.model.getParent(V.cell);ha=this.model.getParent(q);if(!this.isCellSelected(ha)){ia*=aa;var E=2*ia;if(this.model.getChildAt(ha,
-0)!=q&&mxUtils.intersects(X,new mxRectangle(V.x,V.y-ia,V.width,E))||this.model.getChildAt(q,0)!=V.cell&&mxUtils.intersects(X,new mxRectangle(V.x-ia,V.y,E,V.height))||mxUtils.intersects(X,new mxRectangle(V.x,V.y+V.height-ia,V.width,E))||mxUtils.intersects(X,new mxRectangle(V.x+V.width-ia,V.y,E,V.height)))q=this.selectionCellsHandler.isHandled(ha),this.selectCellForEvent(ha,N.getEvent()),ha=this.selectionCellsHandler.getHandler(ha),null!=ha&&(ia=ha.getHandleForEvent(N),null!=ia&&(ha.start(N.getGraphX(),
-N.getGraphY(),ia),ha.blockDelayedSelection=!q,N.consume()))}}for(;!N.isConsumed()&&null!=V&&(this.isTableCell(V.cell)||this.isTableRow(V.cell)||this.isTable(V.cell));)this.isSwimlane(V.cell)&&(ha=this.getActualStartSize(V.cell),(0<ha.x||0<ha.width)&&mxUtils.intersects(X,new mxRectangle(V.x+(ha.x-ha.width-1)*aa+(0==ha.x?V.width:0),V.y,1,V.height))||(0<ha.y||0<ha.height)&&mxUtils.intersects(X,new mxRectangle(V.x,V.y+(ha.y-ha.height-1)*aa+(0==ha.y?V.height:0),V.width,1)))&&(this.selectCellForEvent(V.cell,
-N.getEvent()),ha=this.selectionCellsHandler.getHandler(V.cell),null!=ha&&(ia=mxEvent.CUSTOM_HANDLE-ha.customHandles.length+1,ha.start(N.getGraphX(),N.getGraphY(),ia),N.consume())),V=this.view.getState(this.model.getParent(V.cell))}}}));this.addMouseListener({mouseDown:function(N,aa){},mouseMove:mxUtils.bind(this,function(N,aa){N=this.selectionCellsHandler.handlers.map;for(var V in N)if(null!=N[V].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(aa.getEvent())){var ha=
-this.tolerance;if(null!=F&&null!=P&&null!=L){if(V=P,Math.abs(F.x-aa.getGraphX())>ha||Math.abs(F.y-aa.getGraphY())>ha){var X=this.selectionCellsHandler.getHandler(V.cell);null==X&&this.model.isEdge(V.cell)&&(X=this.createHandler(V));if(null!=X&&null!=X.bends&&0<X.bends.length){N=X.getHandleForEvent(L);var ia=this.view.getEdgeStyle(V);ha=ia==mxEdgeStyle.EntityRelation;f||d!=mxEvent.LABEL_HANDLE||(N=d);if(ha&&0!=N&&N!=X.bends.length-1&&N!=mxEvent.LABEL_HANDLE)!ha||null==V.visibleSourceState&&null==V.visibleTargetState||
-(this.graphHandler.reset(),aa.consume());else if(N==mxEvent.LABEL_HANDLE||0==N||null!=V.visibleSourceState||N==X.bends.length-1||null!=V.visibleTargetState)ha||N==mxEvent.LABEL_HANDLE||(ha=V.absolutePoints,null!=ha&&(null==ia&&null==N||ia==mxEdgeStyle.OrthConnector)&&(N=d,null==N&&(N=new mxRectangle(F.x,F.y),N.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(N,ha[0].x,ha[0].y)?N=0:mxUtils.contains(N,ha[ha.length-1].x,ha[ha.length-1].y)?N=X.bends.length-1:null!=ia&&(2==ha.length||
-3==ha.length&&(0==Math.round(ha[0].x-ha[1].x)&&0==Math.round(ha[1].x-ha[2].x)||0==Math.round(ha[0].y-ha[1].y)&&0==Math.round(ha[1].y-ha[2].y)))?N=2:(N=mxUtils.findNearestSegment(V,F.x,F.y),N=null==ia?mxEvent.VIRTUAL_HANDLE-N:N+1))),null==N&&(N=mxEvent.VIRTUAL_HANDLE)),X.start(aa.getGraphX(),aa.getGraphX(),N),aa.consume(),this.graphHandler.reset()}null!=X&&(this.selectionCellsHandler.isHandlerActive(X)?this.isCellSelected(V.cell)||(this.selectionCellsHandler.handlers.put(V.cell,X),this.selectCellForEvent(V.cell,
-aa.getEvent())):this.isCellSelected(V.cell)||X.destroy());f=!1;F=L=P=d=null}}else if(V=aa.getState(),null!=V&&this.isCellEditable(V.cell)){X=null;if(this.model.isEdge(V.cell)){if(N=new mxRectangle(aa.getGraphX(),aa.getGraphY()),N.grow(mxEdgeHandler.prototype.handleImage.width/2),ha=V.absolutePoints,null!=ha)if(null!=V.text&&null!=V.text.boundingBox&&mxUtils.contains(V.text.boundingBox,aa.getGraphX(),aa.getGraphY()))X="move";else if(mxUtils.contains(N,ha[0].x,ha[0].y)||mxUtils.contains(N,ha[ha.length-
-1].x,ha[ha.length-1].y))X="pointer";else if(null!=V.visibleSourceState||null!=V.visibleTargetState)N=this.view.getEdgeStyle(V),X="crosshair",N!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(V)&&(aa=mxUtils.findNearestSegment(V,aa.getGraphX(),aa.getGraphY()),aa<ha.length-1&&0<=aa&&(X=0==Math.round(ha[aa].x-ha[aa+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(aa.getEvent())){ha=mxShape.prototype.svgStrokeTolerance/2;N=new mxRectangle(aa.getGraphX(),aa.getGraphY());N.grow(ha);if(this.isTableCell(V.cell)&&
-(aa=this.model.getParent(V.cell),ha=this.model.getParent(aa),!this.isCellSelected(ha)))if(mxUtils.intersects(N,new mxRectangle(V.x,V.y-2,V.width,4))&&this.model.getChildAt(ha,0)!=aa||mxUtils.intersects(N,new mxRectangle(V.x,V.y+V.height-2,V.width,4)))X="row-resize";else if(mxUtils.intersects(N,new mxRectangle(V.x-2,V.y,4,V.height))&&this.model.getChildAt(aa,0)!=V.cell||mxUtils.intersects(N,new mxRectangle(V.x+V.width-2,V.y,4,V.height)))X="col-resize";for(aa=V;null==X&&null!=aa&&(this.isTableCell(aa.cell)||
-this.isTableRow(aa.cell)||this.isTable(aa.cell));)this.isSwimlane(aa.cell)&&(ha=this.getActualStartSize(aa.cell),ia=this.view.scale,(0<ha.x||0<ha.width)&&mxUtils.intersects(N,new mxRectangle(aa.x+(ha.x-ha.width-1)*ia+(0==ha.x?aa.width*ia:0),aa.y,1,aa.height))?X="col-resize":(0<ha.y||0<ha.height)&&mxUtils.intersects(N,new mxRectangle(aa.x,aa.y+(ha.y-ha.height-1)*ia+(0==ha.y?aa.height:0),aa.width,1))&&(X="row-resize")),aa=this.view.getState(this.model.getParent(aa.cell))}null!=X&&V.setCursor(X)}}}),
-mouseUp:mxUtils.bind(this,function(N,aa){d=F=L=P=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(N){var aa=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);N.view.graph.isHtmlLabel(N.cell)&&(aa=1!=N.style.html?mxUtils.htmlEntities(aa,!1):N.view.graph.sanitizeHtml(aa));return aa};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(N,aa){return!1};this.alternateEdgeStyle="vertical";null==m&&this.loadStylesheet();var g=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var N=g.apply(this,arguments);if(this.graph.pageVisible){var aa=
-[],V=this.graph.pageFormat,ha=this.graph.pageScale,X=V.width*ha;V=V.height*ha;ha=this.graph.view.translate;for(var ia=this.graph.view.scale,q=this.graph.getPageLayout(),E=0;E<q.width;E++)aa.push(new mxRectangle(((q.x+E)*X+ha.x)*ia,(q.y*V+ha.y)*ia,X*ia,V*ia));for(E=1;E<q.height;E++)aa.push(new mxRectangle((q.x*X+ha.x)*ia,((q.y+E)*V+ha.y)*ia,X*ia,V*ia));N=aa.concat(N)}return N};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(N,aa){return null==
-N.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(N){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var x=this.graphHandler.getCells;this.graphHandler.getCells=function(N){for(var aa=x.apply(this,arguments),V=new mxDictionary,ha=[],X=0;X<aa.length;X++){var ia=this.graph.isTableCell(N)&&this.graph.isTableCell(aa[X])&&this.graph.isCellSelected(aa[X])?
-this.graph.model.getParent(aa[X]):this.graph.isTableRow(N)&&this.graph.isTableRow(aa[X])&&this.graph.isCellSelected(aa[X])?aa[X]:this.graph.getCompositeParent(aa[X]);null==ia||V.get(ia)||(V.put(ia,!0),ha.push(ia))}return ha};var y=this.graphHandler.start;this.graphHandler.start=function(N,aa,V,ha){var X=!1;this.graph.isTableCell(N)&&(this.graph.isCellSelected(N)?X=!0:N=this.graph.model.getParent(N));X||this.graph.isTableRow(N)&&this.graph.isCellSelected(N)||(N=this.graph.getCompositeParent(N));y.apply(this,
-arguments)};this.connectionHandler.createTargetVertex=function(N,aa){aa=this.graph.getCompositeParent(aa);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var t=new mxRubberband(this);this.getRubberband=function(){return t};var G=(new Date).getTime(),D=0,I=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var N=this.currentState;I.apply(this,arguments);N!=this.currentState?(G=(new Date).getTime(),D=0):D=(new Date).getTime()-G};var H=this.connectionHandler.isOutlineConnectEvent;
-this.connectionHandler.isOutlineConnectEvent=function(N){return mxEvent.isShiftDown(N.getEvent())&&mxEvent.isAltDown(N.getEvent())?!1:null!=this.currentState&&N.getState()==this.currentState&&2E3<D||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&H.apply(this,arguments)};var S=this.isToggleEvent;this.isToggleEvent=function(N){return S.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(N)};var T=t.isForceRubberbandEvent;t.isForceRubberbandEvent=
-function(N){return T.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(N.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==N.getState()&&mxEvent.isTouchEvent(N.getEvent())};var M=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(M=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=M)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(N){return mxEvent.isMouseEvent(N.getEvent())};var fa=this.click;this.click=function(N){var aa=null==N.state&&null!=N.sourceState&&this.isCellLocked(N.sourceState.cell);if(this.isEnabled()&&!aa||N.isConsumed())return fa.apply(this,arguments);var V=aa?N.sourceState.cell:N.getCell();null!=V&&(V=this.getClickableLinkForCell(V),null!=V&&(this.isCustomLink(V)?this.customLinkClicked(V):this.openLink(V)));
-this.isEnabled()&&aa&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(N){return N.sourceState};var la=this.tooltipHandler.show;this.tooltipHandler.show=function(){la.apply(this,arguments);if(null!=this.div)for(var N=this.div.getElementsByTagName("a"),aa=0;aa<N.length;aa++)null!=N[aa].getAttribute("href")&&null==N[aa].getAttribute("target")&&N[aa].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(N){return N.sourceState};this.getCursorForMouseEvent=
-function(N){var aa=null==N.state&&null!=N.sourceState&&this.isCellLocked(N.sourceState.cell);return this.getCursorForCell(aa?N.sourceState.cell:N.getCell())};var ra=this.getCursorForCell;this.getCursorForCell=function(N){if(!this.isEnabled()||this.isCellLocked(N)){if(null!=this.getClickableLinkForCell(N))return"pointer";if(this.isCellLocked(N))return"default"}return ra.apply(this,arguments)};this.selectRegion=function(N,aa){var V=mxEvent.isAltDown(aa)?N:null;N=this.getCells(N.x,N.y,N.width,N.height,
-null,null,V,function(ha){return"1"==mxUtils.getValue(ha.style,"locked","0")},!0);if(this.isToggleEvent(aa))for(V=0;V<N.length;V++)this.selectCellForEvent(N[V],aa);else this.selectCellsForEvent(N,aa);return N};var ba=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(N,aa,V){return this.graph.isCellSelected(N)?!1:ba.apply(this,arguments)};this.isCellLocked=function(N){for(;null!=N;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(N),"locked","0"))return!0;
-N=this.model.getParent(N)}return!1};var oa=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(N,aa){"mouseDown"==aa.getProperty("eventName")&&(N=aa.getProperty("event").getState(),oa=null==N||this.isSelectionEmpty()||this.isCellSelected(N.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(N,aa){if(!mxEvent.isMultiTouchEvent(aa)){N=aa.getProperty("event");var V=aa.getProperty("cell");null==V?(N=mxUtils.convertPoint(this.container,
-mxEvent.getClientX(N),mxEvent.getClientY(N)),t.start(N.x,N.y)):null!=oa?this.addSelectionCells(oa):1<this.getSelectionCount()&&this.isCellSelected(V)&&this.removeSelectionCell(V);oa=null;aa.consume()}}));this.connectionHandler.selectCells=function(N,aa){this.graph.setSelectionCell(aa||N)};this.connectionHandler.constraintHandler.isStateIgnored=function(N,aa){var V=N.view.graph;return aa&&(V.isCellSelected(N.cell)||V.isTableRow(N.cell)&&V.selectionCellsHandler.isHandled(V.model.getParent(N.cell)))};
-this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var N=this.connectionHandler.constraintHandler;null!=N.currentFocus&&N.isStateIgnored(N.currentFocus,!0)&&(N.currentFocus=null,N.constraints=null,N.destroyIcons());N.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var na=this.updateMouseEvent;this.updateMouseEvent=function(N){N=na.apply(this,arguments);null!=N.state&&this.isCellLocked(N.getCell())&&(N.state=null);return N}}this.currentTranslate=new mxPoint(0,
-0)};Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.translateDiagram="1"==urlParams["translate-diagram"];Graph.diagramLanguage=null!=urlParams["diagram-language"]?urlParams["diagram-language"]:mxClient.language;
-Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;Graph.zoomWheel=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Text is not SVG - cannot display";Graph.foreignObjectWarningLink="https://www.diagrams.net/doc/faq/svg-export-text-problems";Graph.xmlDeclaration='<?xml version="1.0" encoding="UTF-8"?>';Graph.svgDoctype='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">';Graph.svgFileComment="\x3c!-- Do not edit this file with editors other than diagrams.net --\x3e";
-Graph.pasteStyles="rounded shadow dashed dashPattern fontFamily fontSource fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle".split(" ");
+Graph=function(b,d,g,l,D,p){mxGraph.call(this,b,d,g,l);this.themes=D||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=p?p:!1;b=this.baseUrl;d=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<d&&(d=b.indexOf("/",d+2),0<d&&(this.domainUrl=b.substring(0,d)),d=b.lastIndexOf("/"),0<d&&(this.domainPathUrl=b.substring(0,d+1)));this.isHtmlLabel=function(L){L=this.getCurrentCellStyle(L);
+return null!=L?"1"==L.html||"wrap"==L[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var E=null,N=null,R=null,G=null,M=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(L,V){if("mouseDown"==V.getProperty("eventName")&&this.isEnabled()){L=V.getProperty("event");var T=L.getState();V=this.view.scale;if(!mxEvent.isAltDown(L.getEvent())&&null!=T)if(this.model.isEdge(T.cell))if(E=new mxPoint(L.getGraphX(),L.getGraphY()),M=this.isCellSelected(T.cell),R=T,N=L,null!=T.text&&null!=
+T.text.boundingBox&&mxUtils.contains(T.text.boundingBox,L.getGraphX(),L.getGraphY()))G=mxEvent.LABEL_HANDLE;else{var Y=this.selectionCellsHandler.getHandler(T.cell);null!=Y&&null!=Y.bends&&0<Y.bends.length&&(G=Y.getHandleForEvent(L))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(L.getEvent())&&(Y=this.selectionCellsHandler.getHandler(T.cell),null==Y||null==Y.getHandleForEvent(L))){var W=new mxRectangle(L.getGraphX()-1,L.getGraphY()-1),ka=mxEvent.isTouchEvent(L.getEvent())?mxShape.prototype.svgStrokeTolerance-
+1:(mxShape.prototype.svgStrokeTolerance+2)/2;Y=ka+2;W.grow(ka);if(this.isTableCell(T.cell)&&!this.isCellSelected(T.cell)&&!(mxUtils.contains(T,L.getGraphX()-Y,L.getGraphY()-Y)&&mxUtils.contains(T,L.getGraphX()-Y,L.getGraphY()+Y)&&mxUtils.contains(T,L.getGraphX()+Y,L.getGraphY()+Y)&&mxUtils.contains(T,L.getGraphX()+Y,L.getGraphY()-Y))){var q=this.model.getParent(T.cell);Y=this.model.getParent(q);if(!this.isCellSelected(Y)){ka*=V;var F=2*ka;if(this.model.getChildAt(Y,0)!=q&&mxUtils.intersects(W,new mxRectangle(T.x,
+T.y-ka,T.width,F))||this.model.getChildAt(q,0)!=T.cell&&mxUtils.intersects(W,new mxRectangle(T.x-ka,T.y,F,T.height))||mxUtils.intersects(W,new mxRectangle(T.x,T.y+T.height-ka,T.width,F))||mxUtils.intersects(W,new mxRectangle(T.x+T.width-ka,T.y,F,T.height)))q=this.selectionCellsHandler.isHandled(Y),this.selectCellForEvent(Y,L.getEvent()),Y=this.selectionCellsHandler.getHandler(Y),null!=Y&&(ka=Y.getHandleForEvent(L),null!=ka&&(Y.start(L.getGraphX(),L.getGraphY(),ka),Y.blockDelayedSelection=!q,L.consume()))}}for(;!L.isConsumed()&&
+null!=T&&(this.isTableCell(T.cell)||this.isTableRow(T.cell)||this.isTable(T.cell));)this.isSwimlane(T.cell)&&(Y=this.getActualStartSize(T.cell),(0<Y.x||0<Y.width)&&mxUtils.intersects(W,new mxRectangle(T.x+(Y.x-Y.width-1)*V+(0==Y.x?T.width:0),T.y,1,T.height))||(0<Y.y||0<Y.height)&&mxUtils.intersects(W,new mxRectangle(T.x,T.y+(Y.y-Y.height-1)*V+(0==Y.y?T.height:0),T.width,1)))&&(this.selectCellForEvent(T.cell,L.getEvent()),Y=this.selectionCellsHandler.getHandler(T.cell),null!=Y&&(ka=mxEvent.CUSTOM_HANDLE-
+Y.customHandles.length+1,Y.start(L.getGraphX(),L.getGraphY(),ka),L.consume())),T=this.view.getState(this.model.getParent(T.cell))}}}));this.addMouseListener({mouseDown:function(L,V){},mouseMove:mxUtils.bind(this,function(L,V){L=this.selectionCellsHandler.handlers.map;for(var T in L)if(null!=L[T].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(V.getEvent())){var Y=this.tolerance;if(null!=E&&null!=R&&null!=N){if(T=R,Math.abs(E.x-V.getGraphX())>Y||Math.abs(E.y-V.getGraphY())>
+Y){var W=this.selectionCellsHandler.getHandler(T.cell);null==W&&this.model.isEdge(T.cell)&&(W=this.createHandler(T));if(null!=W&&null!=W.bends&&0<W.bends.length){L=W.getHandleForEvent(N);var ka=this.view.getEdgeStyle(T);Y=ka==mxEdgeStyle.EntityRelation;M||G!=mxEvent.LABEL_HANDLE||(L=G);if(Y&&0!=L&&L!=W.bends.length-1&&L!=mxEvent.LABEL_HANDLE)!Y||null==T.visibleSourceState&&null==T.visibleTargetState||(this.graphHandler.reset(),V.consume());else if(L==mxEvent.LABEL_HANDLE||0==L||null!=T.visibleSourceState||
+L==W.bends.length-1||null!=T.visibleTargetState)Y||L==mxEvent.LABEL_HANDLE||(Y=T.absolutePoints,null!=Y&&(null==ka&&null==L||ka==mxEdgeStyle.OrthConnector)&&(L=G,null==L&&(L=new mxRectangle(E.x,E.y),L.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(L,Y[0].x,Y[0].y)?L=0:mxUtils.contains(L,Y[Y.length-1].x,Y[Y.length-1].y)?L=W.bends.length-1:null!=ka&&(2==Y.length||3==Y.length&&(0==Math.round(Y[0].x-Y[1].x)&&0==Math.round(Y[1].x-Y[2].x)||0==Math.round(Y[0].y-Y[1].y)&&0==Math.round(Y[1].y-
+Y[2].y)))?L=2:(L=mxUtils.findNearestSegment(T,E.x,E.y),L=null==ka?mxEvent.VIRTUAL_HANDLE-L:L+1))),null==L&&(L=mxEvent.VIRTUAL_HANDLE)),W.start(V.getGraphX(),V.getGraphX(),L),V.consume(),this.graphHandler.reset()}null!=W&&(this.selectionCellsHandler.isHandlerActive(W)?this.isCellSelected(T.cell)||(this.selectionCellsHandler.handlers.put(T.cell,W),this.selectCellForEvent(T.cell,V.getEvent())):this.isCellSelected(T.cell)||W.destroy());M=!1;E=N=R=G=null}}else if(T=V.getState(),null!=T&&this.isCellEditable(T.cell)){W=
+null;if(this.model.isEdge(T.cell)){if(L=new mxRectangle(V.getGraphX(),V.getGraphY()),L.grow(mxEdgeHandler.prototype.handleImage.width/2),Y=T.absolutePoints,null!=Y)if(null!=T.text&&null!=T.text.boundingBox&&mxUtils.contains(T.text.boundingBox,V.getGraphX(),V.getGraphY()))W="move";else if(mxUtils.contains(L,Y[0].x,Y[0].y)||mxUtils.contains(L,Y[Y.length-1].x,Y[Y.length-1].y))W="pointer";else if(null!=T.visibleSourceState||null!=T.visibleTargetState)L=this.view.getEdgeStyle(T),W="crosshair",L!=mxEdgeStyle.EntityRelation&&
+this.isOrthogonal(T)&&(V=mxUtils.findNearestSegment(T,V.getGraphX(),V.getGraphY()),V<Y.length-1&&0<=V&&(W=0==Math.round(Y[V].x-Y[V+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(V.getEvent())){Y=mxShape.prototype.svgStrokeTolerance/2;L=new mxRectangle(V.getGraphX(),V.getGraphY());L.grow(Y);if(this.isTableCell(T.cell)&&(V=this.model.getParent(T.cell),Y=this.model.getParent(V),!this.isCellSelected(Y)))if(mxUtils.intersects(L,new mxRectangle(T.x,T.y-2,T.width,4))&&this.model.getChildAt(Y,
+0)!=V||mxUtils.intersects(L,new mxRectangle(T.x,T.y+T.height-2,T.width,4)))W="row-resize";else if(mxUtils.intersects(L,new mxRectangle(T.x-2,T.y,4,T.height))&&this.model.getChildAt(V,0)!=T.cell||mxUtils.intersects(L,new mxRectangle(T.x+T.width-2,T.y,4,T.height)))W="col-resize";for(V=T;null==W&&null!=V&&(this.isTableCell(V.cell)||this.isTableRow(V.cell)||this.isTable(V.cell));)this.isSwimlane(V.cell)&&(Y=this.getActualStartSize(V.cell),ka=this.view.scale,(0<Y.x||0<Y.width)&&mxUtils.intersects(L,new mxRectangle(V.x+
+(Y.x-Y.width-1)*ka+(0==Y.x?V.width*ka:0),V.y,1,V.height))?W="col-resize":(0<Y.y||0<Y.height)&&mxUtils.intersects(L,new mxRectangle(V.x,V.y+(Y.y-Y.height-1)*ka+(0==Y.y?V.height:0),V.width,1))&&(W="row-resize")),V=this.view.getState(this.model.getParent(V.cell))}null!=W&&T.setCursor(W)}}}),mouseUp:mxUtils.bind(this,function(L,V){G=E=N=R=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(L){var V=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);L.view.graph.isHtmlLabel(L.cell)&&
+(V=1!=L.style.html?mxUtils.htmlEntities(V,!1):L.view.graph.sanitizeHtml(V));return V};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;
+this.connectionHandler.isValidSource=function(L,V){return!1};this.alternateEdgeStyle="vertical";null==l&&this.loadStylesheet();var Q=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var L=Q.apply(this,arguments);if(this.graph.pageVisible){var V=[],T=this.graph.pageFormat,Y=this.graph.pageScale,W=T.width*Y;T=T.height*Y;Y=this.graph.view.translate;for(var ka=this.graph.view.scale,q=this.graph.getPageLayout(),F=0;F<q.width;F++)V.push(new mxRectangle(((q.x+F)*W+Y.x)*ka,(q.y*
+T+Y.y)*ka,W*ka,T*ka));for(F=1;F<q.height;F++)V.push(new mxRectangle((q.x*W+Y.x)*ka,((q.y+F)*T+Y.y)*ka,W*ka,T*ka));L=V.concat(L)}return L};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(L,V){return null==L.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(L){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,
+arguments)};var e=this.graphHandler.getCells;this.graphHandler.getCells=function(L){for(var V=e.apply(this,arguments),T=new mxDictionary,Y=[],W=0;W<V.length;W++){var ka=this.graph.isTableCell(L)&&this.graph.isTableCell(V[W])&&this.graph.isCellSelected(V[W])?this.graph.model.getParent(V[W]):this.graph.isTableRow(L)&&this.graph.isTableRow(V[W])&&this.graph.isCellSelected(V[W])?V[W]:this.graph.getCompositeParent(V[W]);null==ka||T.get(ka)||(T.put(ka,!0),Y.push(ka))}return Y};var f=this.graphHandler.start;
+this.graphHandler.start=function(L,V,T,Y){var W=!1;this.graph.isTableCell(L)&&(this.graph.isCellSelected(L)?W=!0:L=this.graph.model.getParent(L));W||this.graph.isTableRow(L)&&this.graph.isCellSelected(L)||(L=this.graph.getCompositeParent(L));f.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(L,V){V=this.graph.getCompositeParent(V);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var k=new mxRubberband(this);this.getRubberband=function(){return k};
+var z=(new Date).getTime(),t=0,B=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var L=this.currentState;B.apply(this,arguments);L!=this.currentState?(z=(new Date).getTime(),t=0):t=(new Date).getTime()-z};var I=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(L){return mxEvent.isShiftDown(L.getEvent())&&mxEvent.isAltDown(L.getEvent())?!1:null!=this.currentState&&L.getState()==this.currentState&&2E3<t||(null==this.currentState||
+"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&I.apply(this,arguments)};var O=this.isToggleEvent;this.isToggleEvent=function(L){return O.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(L)};var J=k.isForceRubberbandEvent;k.isForceRubberbandEvent=function(L){return J.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(L.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==L.getState()&&mxEvent.isTouchEvent(L.getEvent())};
+var y=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(y=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=y)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(L){return mxEvent.isMouseEvent(L.getEvent())};var ia=this.click;this.click=function(L){var V=null==L.state&&null!=
+L.sourceState&&this.isCellLocked(L.sourceState.cell);if(this.isEnabled()&&!V||L.isConsumed())return ia.apply(this,arguments);var T=V?L.sourceState.cell:L.getCell();null!=T&&(T=this.getClickableLinkForCell(T),null!=T&&(this.isCustomLink(T)?this.customLinkClicked(T):this.openLink(T)));this.isEnabled()&&V&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(L){return L.sourceState};var da=this.tooltipHandler.show;this.tooltipHandler.show=function(){da.apply(this,arguments);if(null!=
+this.div)for(var L=this.div.getElementsByTagName("a"),V=0;V<L.length;V++)null!=L[V].getAttribute("href")&&null==L[V].getAttribute("target")&&L[V].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(L){return L.sourceState};this.getCursorForMouseEvent=function(L){var V=null==L.state&&null!=L.sourceState&&this.isCellLocked(L.sourceState.cell);return this.getCursorForCell(V?L.sourceState.cell:L.getCell())};var ja=this.getCursorForCell;this.getCursorForCell=function(L){if(!this.isEnabled()||
+this.isCellLocked(L)){if(null!=this.getClickableLinkForCell(L))return"pointer";if(this.isCellLocked(L))return"default"}return ja.apply(this,arguments)};this.selectRegion=function(L,V){var T=mxEvent.isAltDown(V)?L:null;L=this.getCells(L.x,L.y,L.width,L.height,null,null,T,function(Y){return"1"==mxUtils.getValue(Y.style,"locked","0")},!0);if(this.isToggleEvent(V))for(T=0;T<L.length;T++)this.selectCellForEvent(L[T],V);else this.selectCellsForEvent(L,V);return L};var aa=this.graphHandler.shouldRemoveCellsFromParent;
+this.graphHandler.shouldRemoveCellsFromParent=function(L,V,T){return this.graph.isCellSelected(L)?!1:aa.apply(this,arguments)};this.isCellLocked=function(L){for(;null!=L;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(L),"locked","0"))return!0;L=this.model.getParent(L)}return!1};var qa=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(L,V){"mouseDown"==V.getProperty("eventName")&&(L=V.getProperty("event").getState(),qa=null==L||this.isSelectionEmpty()||this.isCellSelected(L.cell)?
+null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(L,V){if(!mxEvent.isMultiTouchEvent(V)){L=V.getProperty("event");var T=V.getProperty("cell");null==T?(L=mxUtils.convertPoint(this.container,mxEvent.getClientX(L),mxEvent.getClientY(L)),k.start(L.x,L.y)):null!=qa?this.addSelectionCells(qa):1<this.getSelectionCount()&&this.isCellSelected(T)&&this.removeSelectionCell(T);qa=null;V.consume()}}));this.connectionHandler.selectCells=function(L,V){this.graph.setSelectionCell(V||
+L)};this.connectionHandler.constraintHandler.isStateIgnored=function(L,V){var T=L.view.graph;return V&&(T.isCellSelected(L.cell)||T.isTableRow(L.cell)&&T.selectionCellsHandler.isHandled(T.model.getParent(L.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var L=this.connectionHandler.constraintHandler;null!=L.currentFocus&&L.isStateIgnored(L.currentFocus,!0)&&(L.currentFocus=null,L.constraints=null,L.destroyIcons());L.destroyFocusHighlight()}));Graph.touchStyle&&
+this.initTouch();var sa=this.updateMouseEvent;this.updateMouseEvent=function(L){L=sa.apply(this,arguments);null!=L.state&&this.isCellLocked(L.getCell())&&(L.state=null);return L}}this.currentTranslate=new mxPoint(0,0)};Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;
+Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.translateDiagram="1"==urlParams["translate-diagram"];Graph.diagramLanguage=null!=urlParams["diagram-language"]?urlParams["diagram-language"]:mxClient.language;Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;Graph.zoomWheel=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Text is not SVG - cannot display";
+Graph.foreignObjectWarningLink="https://www.diagrams.net/doc/faq/svg-export-text-problems";Graph.xmlDeclaration='<?xml version="1.0" encoding="UTF-8"?>';Graph.svgDoctype='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">';Graph.svgFileComment="\x3c!-- Do not edit this file with editors other than diagrams.net --\x3e";Graph.pasteStyles="rounded shadow dashed dashPattern fontFamily fontSource fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle".split(" ");
Graph.layoutNames="mxHierarchicalLayout mxCircleLayout mxCompactTreeLayout mxEdgeLabelLayout mxFastOrganicLayout mxParallelEdgeLayout mxPartitionLayout mxRadialTreeLayout mxStackLayout".split(" ");
-Graph.createOffscreenGraph=function(b){var e=new Graph(document.createElement("div"));e.stylesheet.styles=mxUtils.clone(b.styles);e.resetViewOnRootChange=!1;e.setConnectable(!1);e.gridEnabled=!1;e.autoScroll=!1;e.setTooltips(!1);e.setEnabled(!1);e.container.style.visibility="hidden";e.container.style.position="absolute";e.container.style.overflow="hidden";e.container.style.height="1px";e.container.style.width="1px";return e};
-Graph.createSvgImage=function(b,e,k,m,C){k=unescape(encodeURIComponent(Graph.svgDoctype+'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+b+'px" height="'+e+'px" '+(null!=m&&null!=C?'viewBox="0 0 '+m+" "+C+'" ':"")+'version="1.1">'+k+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(k):Base64.encode(k,!0)),b,e)};
-Graph.createSvgNode=function(b,e,k,m,C){var p=mxUtils.createXmlDocument(),F=null!=p.createElementNS?p.createElementNS(mxConstants.NS_SVG,"svg"):p.createElement("svg");null!=C&&(null!=F.style?F.style.backgroundColor=C:F.setAttribute("style","background-color:"+C));null==p.createElementNS?(F.setAttribute("xmlns",mxConstants.NS_SVG),F.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):F.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);F.setAttribute("version","1.1");
-F.setAttribute("width",k+"px");F.setAttribute("height",m+"px");F.setAttribute("viewBox",b+" "+e+" "+k+" "+m);p.appendChild(F);return F};Graph.htmlToPng=function(b,e,k,m){var C=document.createElement("canvas");C.width=e;C.height=k;var p=document.createElement("img");p.onload=mxUtils.bind(this,function(){C.getContext("2d").drawImage(p,0,0);m(C.toDataURL())});p.src="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml"><style>em{color:red;}</style><em>I</em> lick <span>cheese</span></div></foreignObject></svg>')};
-Graph.zapGremlins=function(b){for(var e=0,k=[],m=0;m<b.length;m++){var C=b.charCodeAt(m);(32<=C||9==C||10==C||13==C)&&65535!=C&&65534!=C||(k.push(b.substring(e,m)),e=m+1)}0<e&&e<b.length&&k.push(b.substring(e));return 0==k.length?b:k.join("")};Graph.stringToBytes=function(b){for(var e=Array(b.length),k=0;k<b.length;k++)e[k]=b.charCodeAt(k);return e};Graph.bytesToString=function(b){for(var e=Array(b.length),k=0;k<b.length;k++)e[k]=String.fromCharCode(b[k]);return e.join("")};
-Graph.base64EncodeUnicode=function(b){return btoa(encodeURIComponent(b).replace(/%([0-9A-F]{2})/g,function(e,k){return String.fromCharCode(parseInt(k,16))}))};Graph.base64DecodeUnicode=function(b){return decodeURIComponent(Array.prototype.map.call(atob(b),function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)}).join(""))};Graph.compressNode=function(b,e){b=mxUtils.getXml(b);return Graph.compress(e?b:Graph.zapGremlins(b))};
-Graph.arrayBufferToString=function(b){var e="";b=new Uint8Array(b);for(var k=b.byteLength,m=0;m<k;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,k){var m=e.charCodeAt(0),C=1,p=-1;for(k=k||0;k<b.byteLength;k++)if(b[k]==m){p=k;break}for(k=p+1;-1<p&&k<b.byteLength&&k<p+e.length-1;k++){if(b[k]!=e.charCodeAt(C))return Graph.arrayBufferIndexOfString(b,e,p+1);C++}return C==e.length-1?p:-1};Graph.compress=function(b,e){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=e?pako.deflate(encodeURIComponent(b)):pako.deflateRaw(encodeURIComponent(b));return btoa(Graph.arrayBufferToString(new Uint8Array(b)))};
-Graph.decompress=function(b,e,k){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=Graph.stringToArrayBuffer(atob(b));e=decodeURIComponent(e?pako.inflate(b,{to:"string"}):pako.inflateRaw(b,{to:"string"}));return k?e:Graph.zapGremlins(e)};
-Graph.fadeNodes=function(b,e,k,m,C){C=null!=C?C:1E3;Graph.setTransitionForNodes(b,null);Graph.setOpacityForNodes(b,e);window.setTimeout(function(){Graph.setTransitionForNodes(b,"all "+C+"ms ease-in-out");Graph.setOpacityForNodes(b,k);window.setTimeout(function(){Graph.setTransitionForNodes(b,null);null!=m&&m()},C)},0)};Graph.removeKeys=function(b,e){for(var k in b)e(k)&&delete b[k]};
-Graph.setTransitionForNodes=function(b,e){for(var k=0;k<b.length;k++)mxUtils.setPrefixedStyle(b[k].style,"transition",e)};Graph.setOpacityForNodes=function(b,e){for(var k=0;k<b.length;k++)b[k].style.opacity=e};Graph.removePasteFormatting=function(b){for(;null!=b;)null!=b.firstChild&&Graph.removePasteFormatting(b.firstChild),b.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.style&&(b.style.whiteSpace="","#000000"==b.style.color&&(b.style.color="")),b=b.nextSibling};
-Graph.sanitizeHtml=function(b,e){return Graph.domPurify(b,!1)};Graph.sanitizeLink=function(b){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,e){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var k=document.createElement("div");k.style.position="absolute";k.style.visibility="hidden";var m=decodeURIComponent(escape(atob(b.substring(26)))),C=m.indexOf("<svg");if(0<=C){k.innerHTML=Graph.sanitizeHtml(m.substring(C));var p=k.getElementsByTagName("svg");if(0<p.length){if(e||null!=p[0].getAttribute("preserveAspectRatio")){document.body.appendChild(k);try{m=e=
-1;var F=p[0].getAttribute("width"),L=p[0].getAttribute("height");F=null!=F&&"%"!=F.charAt(F.length-1)?parseFloat(F):NaN;L=null!=L&&"%"!=L.charAt(L.length-1)?parseFloat(L):NaN;var P=p[0].getAttribute("viewBox");if(null!=P&&!isNaN(F)&&!isNaN(L)){var d=P.split(" ");4<=P.length&&(e=parseFloat(d[2])/F,m=parseFloat(d[3])/L)}var f=p[0].getBBox();0<f.width&&0<f.height&&(k.getElementsByTagName("svg")[0].setAttribute("viewBox",f.x+" "+f.y+" "+f.width+" "+f.height),k.getElementsByTagName("svg")[0].setAttribute("width",
-f.width/e),k.getElementsByTagName("svg")[0].setAttribute("height",f.height/m))}catch(g){}finally{document.body.removeChild(k)}}b=Editor.createSvgDataUri(mxUtils.getXml(p[0]))}}}catch(g){}return b};Graph.stripQuotes=function(b){null!=b&&("'"==b.charAt(0)&&(b=b.substring(1)),"'"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)),'"'==b.charAt(0)&&(b=b.substring(1)),'"'==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)));return b};
-Graph.createRemoveIcon=function(b,e){var k=document.createElement("img");k.setAttribute("src",Dialog.prototype.clearImage);k.setAttribute("title",b);k.setAttribute("width","13");k.setAttribute("height","10");k.style.marginLeft="4px";k.style.marginBottom="-1px";k.style.cursor="pointer";mxEvent.addListener(k,"click",e);return k};Graph.isPageLink=function(b){return null!=b&&"data:page/id,"==b.substring(0,13)};Graph.isLink=function(b){return null!=b&&Graph.linkPattern.test(b)};
+Graph.createOffscreenGraph=function(b){var d=new Graph(document.createElement("div"));d.stylesheet.styles=mxUtils.clone(b.styles);d.resetViewOnRootChange=!1;d.setConnectable(!1);d.gridEnabled=!1;d.autoScroll=!1;d.setTooltips(!1);d.setEnabled(!1);d.container.style.visibility="hidden";d.container.style.position="absolute";d.container.style.overflow="hidden";d.container.style.height="1px";d.container.style.width="1px";return d};
+Graph.createSvgImage=function(b,d,g,l,D){g=unescape(encodeURIComponent(Graph.svgDoctype+'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+b+'px" height="'+d+'px" '+(null!=l&&null!=D?'viewBox="0 0 '+l+" "+D+'" ':"")+'version="1.1">'+g+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(g):Base64.encode(g,!0)),b,d)};
+Graph.createSvgNode=function(b,d,g,l,D){var p=mxUtils.createXmlDocument(),E=null!=p.createElementNS?p.createElementNS(mxConstants.NS_SVG,"svg"):p.createElement("svg");null!=D&&(null!=E.style?E.style.backgroundColor=D:E.setAttribute("style","background-color:"+D));null==p.createElementNS?(E.setAttribute("xmlns",mxConstants.NS_SVG),E.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):E.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);E.setAttribute("version","1.1");
+E.setAttribute("width",g+"px");E.setAttribute("height",l+"px");E.setAttribute("viewBox",b+" "+d+" "+g+" "+l);p.appendChild(E);return E};Graph.htmlToPng=function(b,d,g,l){var D=document.createElement("canvas");D.width=d;D.height=g;var p=document.createElement("img");p.onload=mxUtils.bind(this,function(){D.getContext("2d").drawImage(p,0,0);l(D.toDataURL())});p.src="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml"><style>em{color:red;}</style><em>I</em> lick <span>cheese</span></div></foreignObject></svg>')};
+Graph.zapGremlins=function(b){for(var d=0,g=[],l=0;l<b.length;l++){var D=b.charCodeAt(l);(32<=D||9==D||10==D||13==D)&&65535!=D&&65534!=D||(g.push(b.substring(d,l)),d=l+1)}0<d&&d<b.length&&g.push(b.substring(d));return 0==g.length?b:g.join("")};Graph.stringToBytes=function(b){for(var d=Array(b.length),g=0;g<b.length;g++)d[g]=b.charCodeAt(g);return d};Graph.bytesToString=function(b){for(var d=Array(b.length),g=0;g<b.length;g++)d[g]=String.fromCharCode(b[g]);return d.join("")};
+Graph.base64EncodeUnicode=function(b){return btoa(encodeURIComponent(b).replace(/%([0-9A-F]{2})/g,function(d,g){return String.fromCharCode(parseInt(g,16))}))};Graph.base64DecodeUnicode=function(b){return decodeURIComponent(Array.prototype.map.call(atob(b),function(d){return"%"+("00"+d.charCodeAt(0).toString(16)).slice(-2)}).join(""))};Graph.compressNode=function(b,d){b=mxUtils.getXml(b);return Graph.compress(d?b:Graph.zapGremlins(b))};
+Graph.arrayBufferToString=function(b){var d="";b=new Uint8Array(b);for(var g=b.byteLength,l=0;l<g;l++)d+=String.fromCharCode(b[l]);return d};Graph.stringToArrayBuffer=function(b){return Uint8Array.from(b,function(d){return d.charCodeAt(0)})};
+Graph.arrayBufferIndexOfString=function(b,d,g){var l=d.charCodeAt(0),D=1,p=-1;for(g=g||0;g<b.byteLength;g++)if(b[g]==l){p=g;break}for(g=p+1;-1<p&&g<b.byteLength&&g<p+d.length-1;g++){if(b[g]!=d.charCodeAt(D))return Graph.arrayBufferIndexOfString(b,d,p+1);D++}return D==d.length-1?p:-1};Graph.compress=function(b,d){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=d?pako.deflate(encodeURIComponent(b)):pako.deflateRaw(encodeURIComponent(b));return btoa(Graph.arrayBufferToString(new Uint8Array(b)))};
+Graph.decompress=function(b,d,g){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=Graph.stringToArrayBuffer(atob(b));d=decodeURIComponent(d?pako.inflate(b,{to:"string"}):pako.inflateRaw(b,{to:"string"}));return g?d:Graph.zapGremlins(d)};
+Graph.fadeNodes=function(b,d,g,l,D){D=null!=D?D:1E3;Graph.setTransitionForNodes(b,null);Graph.setOpacityForNodes(b,d);window.setTimeout(function(){Graph.setTransitionForNodes(b,"all "+D+"ms ease-in-out");Graph.setOpacityForNodes(b,g);window.setTimeout(function(){Graph.setTransitionForNodes(b,null);null!=l&&l()},D)},0)};Graph.removeKeys=function(b,d){for(var g in b)d(g)&&delete b[g]};
+Graph.setTransitionForNodes=function(b,d){for(var g=0;g<b.length;g++)mxUtils.setPrefixedStyle(b[g].style,"transition",d)};Graph.setOpacityForNodes=function(b,d){for(var g=0;g<b.length;g++)b[g].style.opacity=d};Graph.removePasteFormatting=function(b){for(;null!=b;)null!=b.firstChild&&Graph.removePasteFormatting(b.firstChild),b.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.style&&(b.style.whiteSpace="","#000000"==b.style.color&&(b.style.color="")),b=b.nextSibling};
+Graph.sanitizeHtml=function(b,d){return Graph.domPurify(b,!1)};Graph.sanitizeLink=function(b){if(null==b)return null;var d=document.createElement("a");d.setAttribute("href",b);Graph.sanitizeNode(d);return d.getAttribute("href")};Graph.sanitizeNode=function(b){return Graph.domPurify(b,!0)};
+DOMPurify.addHook("afterSanitizeAttributes",function(b){"use"==b.nodeName&&(null!=b.getAttribute("xlink:href")&&!b.getAttribute("xlink:href").startsWith("#")||null!=b.getAttribute("href")&&!b.getAttribute("href").startsWith("#"))&&b.remove()});DOMPurify.addHook("uponSanitizeAttribute",function(b,d){"svg"==b.nodeName&&"content"==d.attrName&&(d.forceKeepAttr=!0);return b});Graph.domPurify=function(b,d){window.DOM_PURIFY_CONFIG.IN_PLACE=d;return DOMPurify.sanitize(b,window.DOM_PURIFY_CONFIG)};
+Graph.clipSvgDataUri=function(b,d){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var g=document.createElement("div");g.style.position="absolute";g.style.visibility="hidden";var l=decodeURIComponent(escape(atob(b.substring(26)))),D=l.indexOf("<svg");if(0<=D){g.innerHTML=Graph.sanitizeHtml(l.substring(D));var p=g.getElementsByTagName("svg");if(0<p.length){if(d||null!=p[0].getAttribute("preserveAspectRatio")){document.body.appendChild(g);try{l=d=
+1;var E=p[0].getAttribute("width"),N=p[0].getAttribute("height");E=null!=E&&"%"!=E.charAt(E.length-1)?parseFloat(E):NaN;N=null!=N&&"%"!=N.charAt(N.length-1)?parseFloat(N):NaN;var R=p[0].getAttribute("viewBox");if(null!=R&&!isNaN(E)&&!isNaN(N)){var G=R.split(" ");4<=R.length&&(d=parseFloat(G[2])/E,l=parseFloat(G[3])/N)}var M=p[0].getBBox();0<M.width&&0<M.height&&(g.getElementsByTagName("svg")[0].setAttribute("viewBox",M.x+" "+M.y+" "+M.width+" "+M.height),g.getElementsByTagName("svg")[0].setAttribute("width",
+M.width/d),g.getElementsByTagName("svg")[0].setAttribute("height",M.height/l))}catch(Q){}finally{document.body.removeChild(g)}}b=Editor.createSvgDataUri(mxUtils.getXml(p[0]))}}}catch(Q){}return b};Graph.stripQuotes=function(b){null!=b&&("'"==b.charAt(0)&&(b=b.substring(1)),"'"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)),'"'==b.charAt(0)&&(b=b.substring(1)),'"'==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)));return b};
+Graph.createRemoveIcon=function(b,d){var 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",d);return g};Graph.isPageLink=function(b){return null!=b&&"data:page/id,"==b.substring(0,13)};Graph.isLink=function(b){return null!=b&&Graph.linkPattern.test(b)};
Graph.linkPattern=RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i");mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.linkRelation="nofollow noopener noreferrer";
-Graph.prototype.defaultScrollbars=!0;Graph.prototype.defaultPageVisible=!0;Graph.prototype.defaultGridEnabled="0"!=urlParams.grid;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.shapeForegroundColor="#000000";Graph.prototype.shapeBackgroundColor="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;
-Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}^ ^\"^ '^=^;]+)%","g");Graph.prototype.absoluteUrlPattern=RegExp("^(?:[a-z]+:)?//","i");Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=null!=urlParams.base?decodeURIComponent(urlParams.base):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];
+Graph.prototype.defaultScrollbars=!0;Graph.prototype.defaultPageVisible=!0;Graph.prototype.defaultGridEnabled="0"!=urlParams.grid;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";Graph.prototype.sketchBackgroundColor="#f0f0f0";Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.shapeForegroundColor="#000000";Graph.prototype.shapeBackgroundColor="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;
+Graph.prototype.selectParentAfterDelete=!1;Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}^ ^\"^ '^=^;]+)%","g");Graph.prototype.absoluteUrlPattern=RegExp("^(?:[a-z]+:)?//","i");Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=null!=urlParams.base?decodeURIComponent(urlParams.base):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];
Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];Graph.prototype.standalone=!1;Graph.prototype.enableFlowAnimation=!1;Graph.prototype.roundableShapes="label rectangle internalStorage corner parallelogram swimlane triangle trapezoid ext step tee process link rhombus offPageConnector loopLimit hexagon manualInput card curlyBracket singleArrow callout doubleArrow flexArrow umlLifeline".split(" ");
-Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(k,m){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var C=k.view.graph.tolerance,p=!0,F=null,L=mxUtils.bind(this,function(f){p=!0;F=new mxPoint(mxEvent.getClientX(f),mxEvent.getClientY(f))}),P=mxUtils.bind(this,function(f){p=p&&null!=F&&Math.abs(F.x-mxEvent.getClientX(f))<C&&Math.abs(F.y-mxEvent.getClientY(f))<C}),d=mxUtils.bind(this,function(f){if(p)for(var g=mxEvent.getSource(f);null!=
-g&&g!=m.node;){if("a"==g.nodeName.toLowerCase()){k.view.graph.labelLinkClicked(k,g,f);break}g=g.parentNode}});mxEvent.addGestureListeners(m.node,L,P,d);mxEvent.addListener(m.node,"click",function(f){mxEvent.consume(f)})};if(null!=this.tooltipHandler){var e=this.tooltipHandler.init;this.tooltipHandler.init=function(){e.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(k){var m=mxEvent.getSource(k);"A"==m.nodeName&&(m=m.getAttribute("href"),null!=
-m&&this.graph.isCustomLink(m)&&(mxEvent.isTouchEvent(k)||!mxEvent.isPopupTrigger(k))&&this.graph.customLinkClicked(m)&&mxEvent.consume(k))}))}}this.addListener(mxEvent.SIZE,mxUtils.bind(this,function(k,m){null!=this.container&&this.flowAnimationStyle&&(k=this.flowAnimationStyle.getAttribute("id"),this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(k))}));this.initLayoutManager()};
-(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isFillState=function(F){return!this.isSpecialColor(F.style[mxConstants.STYLE_FILLCOLOR])&&"1"!=mxUtils.getValue(F.style,"lineShape",null)&&(this.model.isVertex(F.cell)||"arrow"==mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null)||"filledEdge"==mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null)||"flexArrow"==mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,
-null)||"mxgraph.arrows2.wedgeArrow"==mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isStrokeState=function(F){return!this.isSpecialColor(F.style[mxConstants.STYLE_STROKECOLOR])};Graph.prototype.isSpecialColor=function(F){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],F)};Graph.prototype.isGlassState=function(F){F=mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null);return"label"==F||"rectangle"==F||
-"internalStorage"==F||"ext"==F||"umlLifeline"==F||"swimlane"==F||"process"==F};Graph.prototype.isRoundedState=function(F){return null!=F.shape?F.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isLineJumpState=function(F){var L=mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(F.style,mxConstants.STYLE_CURVED,!1)&&("connector"==L||"filledEdge"==L)};Graph.prototype.isAutoSizeState=function(F){return"1"==
-mxUtils.getValue(F.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(F){F=mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null);return"label"==F||"image"==F};Graph.prototype.isShadowState=function(F){return"image"!=mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null)};Graph.prototype.getVerticesAndEdges=function(F,L){F=null!=F?F:!0;L=null!=L?L:!0;var P=this.model;return P.filterDescendants(function(d){return F&&P.isVertex(d)||L&&P.isEdge(d)},P.getRoot())};Graph.prototype.getCommonStyle=
-function(F){for(var L={},P=0;P<F.length;P++){var d=this.view.getState(F[P]);this.mergeStyle(d.style,L,0==P)}return L};Graph.prototype.mergeStyle=function(F,L,P){if(null!=F){var d={},f;for(f in F){var g=F[f];null!=g&&(d[f]=!0,null==L[f]&&P?L[f]=g:L[f]!=g&&delete L[f])}for(f in L)d[f]||delete L[f]}};Graph.prototype.getStartEditingCell=function(F,L){L=this.getCellStyle(F);L=parseInt(mxUtils.getValue(L,mxConstants.STYLE_STARTSIZE,0));this.isTable(F)&&(!this.isSwimlane(F)||0==L)&&""==this.getLabel(F)&&
-0<this.model.getChildCount(F)&&(F=this.model.getChildAt(F,0),L=this.getCellStyle(F),L=parseInt(mxUtils.getValue(L,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(F)&&(!this.isSwimlane(F)||0==L)&&""==this.getLabel(F)&&0<this.model.getChildCount(F))for(L=0;L<this.model.getChildCount(F);L++){var P=this.model.getChildAt(F,L);if(this.isCellEditable(P)){F=P;break}}return F};Graph.prototype.copyStyle=function(F){return this.getCellStyle(F,!1)};Graph.prototype.pasteStyle=function(F,L,P){P=null!=P?P:Graph.pasteStyles;
-Graph.removeKeys(F,function(d){return 0>mxUtils.indexOf(P,d)});this.updateCellStyles(F,L)};Graph.prototype.updateCellStyles=function(F,L){this.model.beginUpdate();try{for(var P=0;P<L.length;P++)if(this.model.isVertex(L[P])||this.model.isEdge(L[P])){var d=this.getCellStyle(L[P],!1),f;for(f in F){var g=F[f];d[f]!=g&&this.setCellStyles(f,g,[L[P]])}}}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(F,L,P,d,f,g){this.useCssTransforms&&(F=F/this.currentScale-this.currentTranslate.x,L=L/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(F,L,P,d,f,g){d=null!=d?d:!0;f=null!=f?f:!0;
-null==P&&(P=this.getCurrentRoot(),null==P&&(P=this.getModel().getRoot()));if(null!=P)for(var x=this.model.getChildCount(P)-1;0<=x;x--){var y=this.model.getChildAt(P,x),t=this.getScaledCellAt(F,L,y,d,f,g);if(null!=t)return t;if(this.isCellVisible(y)&&(f&&this.model.isEdge(y)||d&&this.model.isVertex(y))&&(t=this.view.getState(y),null!=t&&(null==g||!g(t,F,L))&&this.intersects(t,F,L)))return y}return null};Graph.prototype.isRecursiveVertexResize=function(F){return!this.isSwimlane(F.cell)&&0<this.model.getChildCount(F.cell)&&
-!this.isCellCollapsed(F.cell)&&"1"==mxUtils.getValue(F.style,"recursiveResize","1")&&null==mxUtils.getValue(F.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(F){for(var L=this.getCellGeometry(F);null!=L&&L.relative;)F=this.getModel().getParent(F),L=this.getCellGeometry(F);return F};Graph.prototype.isPart=function(F){return"1"==mxUtils.getValue(this.getCurrentCellStyle(F),"part","0")||this.isTableCell(F)||this.isTableRow(F)};Graph.prototype.getCompositeParents=function(F){for(var L=
-new mxDictionary,P=[],d=0;d<F.length;d++){var f=this.getCompositeParent(F[d]);this.isTableCell(f)&&(f=this.graph.model.getParent(f));this.isTableRow(f)&&(f=this.graph.model.getParent(f));null==f||L.get(f)||(L.put(f,!0),P.push(f))}return P};Graph.prototype.getCompositeParent=function(F){for(;this.isPart(F);){var L=this.model.getParent(F);if(!this.model.isVertex(L))break;F=L}return F};Graph.prototype.filterSelectionCells=function(F){var L=this.getSelectionCells();if(null!=F){for(var P=[],d=0;d<L.length;d++)F(L[d])||
-P.push(L[d]);L=P}return L};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(F){if(this.useCssTransforms){var L=this.currentScale,P=this.currentTranslate;F=new mxRectangle((F.x+2*P.x)*L-P.x,(F.y+2*P.y)*L-P.y,F.width*L,F.height*L)}b.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=function(F){F=this.strokeWidth;this.graph.useCssTransforms&&(F/=this.graph.currentScale);return F};mxGraphView.prototype.getGraphBounds=function(){var F=this.graphBounds;
-if(this.graph.useCssTransforms){var L=this.graph.currentTranslate,P=this.graph.currentScale;F=new mxRectangle((F.x+L.x)*P,(F.y+L.y)*P,F.width*P,F.height*P)}return F};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var e=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(F){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=
-this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);e.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var k=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(F){F=k.apply(this,arguments);for(var L=[],P=0;P<F.length;P++)this.isTableRow(F[P])||this.isTableCell(F[P])||L.push(F[P]);return L};var m=
-mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(F){F=m.apply(this,arguments);for(var L=[],P=0;P<F.length;P++)this.isTable(F[P])||this.isTableRow(F[P])||this.isTableCell(F[P])||L.push(F[P]);return L};Graph.prototype.updateCssTransform=function(){var F=this.view.getDrawPane();if(null!=F)if(F=F.parentNode,this.useCssTransforms){var L=F.getAttribute("transform");F.setAttribute("transformOrigin","0 0");var P=Math.round(100*this.currentScale)/100;F.setAttribute("transform",
-"scale("+P+","+P+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");L!=F.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",F.getAttribute("transform"))}else F.removeAttribute("transformOrigin"),F.removeAttribute("transform")};var C=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var F=this.graph.useCssTransforms,L=this.scale,P=this.translate;
-F&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);C.apply(this,arguments);F&&(this.scale=L,this.translate=P)};var p=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(F,L,P){var d=this.useCssTransforms,f=this.view.scale,g=this.view.translate;d&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);p.apply(this,arguments);d&&(this.view.scale=f,this.view.translate=g,this.useCssTransforms=!0)}})();
-Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};Graph.prototype.labelLinkClicked=function(b,e,k){e=e.getAttribute("href");if(null!=e&&!this.isCustomLink(e)&&(mxEvent.isLeftMouseButton(k)&&!mxEvent.isPopupTrigger(k)||mxEvent.isTouchEvent(k))){if(!this.isEnabled()||this.isCellLocked(b.cell))b=this.isBlankLink(e)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(e),b);mxEvent.consume(k)}};
-Graph.prototype.openLink=function(b,e,k){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 C=b.split("#")[1];window.location.hash=="#"+C&&(window.location.hash="");window.location.hash=C}else m=window.open(b,null!=e?e:"_blank"),null==m||k||(m.opener=null)}catch(p){}return m};
+Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(g,l){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var D=g.view.graph.tolerance,p=!0,E=null,N=mxUtils.bind(this,function(M){p=!0;E=new mxPoint(mxEvent.getClientX(M),mxEvent.getClientY(M))}),R=mxUtils.bind(this,function(M){p=p&&null!=E&&Math.abs(E.x-mxEvent.getClientX(M))<D&&Math.abs(E.y-mxEvent.getClientY(M))<D}),G=mxUtils.bind(this,function(M){if(p)for(var Q=mxEvent.getSource(M);null!=
+Q&&Q!=l.node;){if("a"==Q.nodeName.toLowerCase()){g.view.graph.labelLinkClicked(g,Q,M);break}Q=Q.parentNode}});mxEvent.addGestureListeners(l.node,N,R,G);mxEvent.addListener(l.node,"click",function(M){mxEvent.consume(M)})};if(null!=this.tooltipHandler){var d=this.tooltipHandler.init;this.tooltipHandler.init=function(){d.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(g){var l=mxEvent.getSource(g);"A"==l.nodeName&&(l=l.getAttribute("href"),null!=
+l&&this.graph.isCustomLink(l)&&(mxEvent.isTouchEvent(g)||!mxEvent.isPopupTrigger(g))&&this.graph.customLinkClicked(l)&&mxEvent.consume(g))}))}}this.addListener(mxEvent.SIZE,mxUtils.bind(this,function(g,l){null!=this.container&&this.flowAnimationStyle&&(g=this.flowAnimationStyle.getAttribute("id"),this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(g))}));this.initLayoutManager()};
+(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isFillState=function(E){return!this.isSpecialColor(E.style[mxConstants.STYLE_FILLCOLOR])&&"1"!=mxUtils.getValue(E.style,"lineShape",null)&&(this.model.isVertex(E.cell)||"arrow"==mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null)||"filledEdge"==mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null)||"flexArrow"==mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,
+null)||"mxgraph.arrows2.wedgeArrow"==mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isStrokeState=function(E){return!this.isSpecialColor(E.style[mxConstants.STYLE_STROKECOLOR])};Graph.prototype.isSpecialColor=function(E){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],E)};Graph.prototype.isGlassState=function(E){E=mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null);return"label"==E||"rectangle"==E||
+"internalStorage"==E||"ext"==E||"umlLifeline"==E||"swimlane"==E||"process"==E};Graph.prototype.isRoundedState=function(E){return null!=E.shape?E.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isLineJumpState=function(E){var N=mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(E.style,mxConstants.STYLE_CURVED,!1)&&("connector"==N||"filledEdge"==N)};Graph.prototype.isAutoSizeState=function(E){return"1"==
+mxUtils.getValue(E.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(E){E=mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null);return"label"==E||"image"==E};Graph.prototype.isShadowState=function(E){return"image"!=mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null)};Graph.prototype.getVerticesAndEdges=function(E,N){E=null!=E?E:!0;N=null!=N?N:!0;var R=this.model;return R.filterDescendants(function(G){return E&&R.isVertex(G)||N&&R.isEdge(G)},R.getRoot())};Graph.prototype.getCommonStyle=
+function(E){for(var N={},R=0;R<E.length;R++){var G=this.view.getState(E[R]);this.mergeStyle(G.style,N,0==R)}return N};Graph.prototype.mergeStyle=function(E,N,R){if(null!=E){var G={},M;for(M in E){var Q=E[M];null!=Q&&(G[M]=!0,null==N[M]&&R?N[M]=Q:N[M]!=Q&&delete N[M])}for(M in N)G[M]||delete N[M]}};Graph.prototype.getStartEditingCell=function(E,N){N=this.getCellStyle(E);N=parseInt(mxUtils.getValue(N,mxConstants.STYLE_STARTSIZE,0));this.isTable(E)&&(!this.isSwimlane(E)||0==N)&&""==this.getLabel(E)&&
+0<this.model.getChildCount(E)&&(E=this.model.getChildAt(E,0),N=this.getCellStyle(E),N=parseInt(mxUtils.getValue(N,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(E)&&(!this.isSwimlane(E)||0==N)&&""==this.getLabel(E)&&0<this.model.getChildCount(E))for(N=0;N<this.model.getChildCount(E);N++){var R=this.model.getChildAt(E,N);if(this.isCellEditable(R)){E=R;break}}return E};Graph.prototype.copyStyle=function(E){return this.getCellStyle(E,!1)};Graph.prototype.pasteStyle=function(E,N,R){R=null!=R?R:Graph.pasteStyles;
+Graph.removeKeys(E,function(G){return 0>mxUtils.indexOf(R,G)});this.updateCellStyles(E,N)};Graph.prototype.updateCellStyles=function(E,N){this.model.beginUpdate();try{for(var R=0;R<N.length;R++)if(this.model.isVertex(N[R])||this.model.isEdge(N[R])){var G=this.getCellStyle(N[R],!1),M;for(M in E){var Q=E[M];G[M]!=Q&&this.setCellStyles(M,Q,[N[R]])}}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&
+(this.isCssTransformsSupported()||mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(E,N,R,G,M,Q){this.useCssTransforms&&(E=E/this.currentScale-this.currentTranslate.x,N=N/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(E,N,R,G,M,Q){G=null!=G?G:!0;M=null!=M?M:!0;
+null==R&&(R=this.getCurrentRoot(),null==R&&(R=this.getModel().getRoot()));if(null!=R)for(var e=this.model.getChildCount(R)-1;0<=e;e--){var f=this.model.getChildAt(R,e),k=this.getScaledCellAt(E,N,f,G,M,Q);if(null!=k)return k;if(this.isCellVisible(f)&&(M&&this.model.isEdge(f)||G&&this.model.isVertex(f))&&(k=this.view.getState(f),null!=k&&(null==Q||!Q(k,E,N))&&this.intersects(k,E,N)))return f}return null};Graph.prototype.isRecursiveVertexResize=function(E){return!this.isSwimlane(E.cell)&&0<this.model.getChildCount(E.cell)&&
+!this.isCellCollapsed(E.cell)&&"1"==mxUtils.getValue(E.style,"recursiveResize","1")&&null==mxUtils.getValue(E.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(E){for(var N=this.getCellGeometry(E);null!=N&&N.relative;)E=this.getModel().getParent(E),N=this.getCellGeometry(E);return E};Graph.prototype.isPart=function(E){return"1"==mxUtils.getValue(this.getCurrentCellStyle(E),"part","0")||this.isTableCell(E)||this.isTableRow(E)};Graph.prototype.getCompositeParents=function(E){for(var N=
+new mxDictionary,R=[],G=0;G<E.length;G++){var M=this.getCompositeParent(E[G]);this.isTableCell(M)&&(M=this.graph.model.getParent(M));this.isTableRow(M)&&(M=this.graph.model.getParent(M));null==M||N.get(M)||(N.put(M,!0),R.push(M))}return R};Graph.prototype.getCompositeParent=function(E){for(;this.isPart(E);){var N=this.model.getParent(E);if(!this.model.isVertex(N))break;E=N}return E};Graph.prototype.filterSelectionCells=function(E){var N=this.getSelectionCells();if(null!=E){for(var R=[],G=0;G<N.length;G++)E(N[G])||
+R.push(N[G]);N=R}return N};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(E){if(this.useCssTransforms){var N=this.currentScale,R=this.currentTranslate;E=new mxRectangle((E.x+2*R.x)*N-R.x,(E.y+2*R.y)*N-R.y,E.width*N,E.height*N)}b.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=function(E){E=this.strokeWidth;this.graph.useCssTransforms&&(E/=this.graph.currentScale);return E};mxGraphView.prototype.getGraphBounds=function(){var E=this.graphBounds;
+if(this.graph.useCssTransforms){var N=this.graph.currentTranslate,R=this.graph.currentScale;E=new mxRectangle((E.x+N.x)*R,(E.y+N.y)*R,E.width*R,E.height*R)}return E};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var d=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(E){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=
+this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);d.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var g=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(E){E=g.apply(this,arguments);for(var N=[],R=0;R<E.length;R++)this.isTableRow(E[R])||this.isTableCell(E[R])||N.push(E[R]);return N};var l=
+mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(E){E=l.apply(this,arguments);for(var N=[],R=0;R<E.length;R++)this.isTable(E[R])||this.isTableRow(E[R])||this.isTableCell(E[R])||N.push(E[R]);return N};Graph.prototype.updateCssTransform=function(){var E=this.view.getDrawPane();if(null!=E)if(E=E.parentNode,this.useCssTransforms){var N=E.getAttribute("transform");E.setAttribute("transformOrigin","0 0");var R=Math.round(100*this.currentScale)/100;E.setAttribute("transform",
+"scale("+R+","+R+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");N!=E.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",E.getAttribute("transform"))}else E.removeAttribute("transformOrigin"),E.removeAttribute("transform")};var D=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var E=this.graph.useCssTransforms,N=this.scale,R=this.translate;
+E&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);D.apply(this,arguments);E&&(this.scale=N,this.translate=R)};var p=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(E,N,R){var G=this.useCssTransforms,M=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=M,this.view.translate=Q,this.useCssTransforms=!0)}})();
+Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};Graph.prototype.labelLinkClicked=function(b,d,g){var l=d.getAttribute("href");l!=Graph.sanitizeLink(l)&&Graph.sanitizeNode(d);if(null!=l&&!this.isCustomLink(l)&&(mxEvent.isLeftMouseButton(g)&&!mxEvent.isPopupTrigger(g)||mxEvent.isTouchEvent(g))){if(!this.isEnabled()||this.isCellLocked(b.cell))b=this.isBlankLink(l)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(l),b);mxEvent.consume(g)}};
+Graph.prototype.openLink=function(b,d,g){var l=window;try{if(b=Graph.sanitizeLink(b),null!=b)if("_self"==d&&window!=window.top)window.location.href=b;else if(b.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==b.charAt(this.baseUrl.length)&&"_top"==d&&window==window.top){var D=b.split("#")[1];window.location.hash=="#"+D&&(window.location.hash="");window.location.hash=D}else l=window.open(b,null!=d?d:"_blank"),null==l||g||(l.opener=null)}catch(p){}return l};
Graph.prototype.getLinkTitle=function(b){return b.substring(b.lastIndexOf("/")+1)};Graph.prototype.isCustomLink=function(b){return"data:"==b.substring(0,5)};Graph.prototype.customLinkClicked=function(b){return!1};Graph.prototype.isExternalProtocol=function(b){return"mailto:"===b.substring(0,7)};Graph.prototype.isBlankLink=function(b){return!this.isExternalProtocol(b)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(b)&&b.substring(0,this.domainUrl.length)!==this.domainUrl)};
Graph.prototype.isRelativeUrl=function(b){return null!=b&&!this.absoluteUrlPattern.test(b)&&"data:"!==b.substring(0,5)&&!this.isExternalProtocol(b)};Graph.prototype.getAbsoluteUrl=function(b){null!=b&&this.isRelativeUrl(b)&&(b="#"==b.charAt(0)?this.baseUrl+b:"/"==b.charAt(0)?this.domainUrl+b:this.domainPathUrl+b);return b};
-Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.hasLayout=function(b){return null!=this.graph.getCellStyle(b).childLayout};this.layoutManager.getLayout=function(b,e){var k=this.graph.model.getParent(b);if(!this.graph.isCellCollapsed(b)&&(e!=mxEvent.BEGIN_UPDATE||this.hasLayout(k,e))){b=this.graph.getCellStyle(b);if("stackLayout"==b.childLayout)return e=new mxStackLayout(this.graph,!0),e.resizeParentMax="1"==mxUtils.getValue(b,"resizeParentMax",
-"1"),e.horizontal="1"==mxUtils.getValue(b,"horizontalStack","1"),e.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),e.resizeLast="1"==mxUtils.getValue(b,"resizeLast","0"),e.spacing=b.stackSpacing||e.spacing,e.border=b.stackBorder||e.border,e.marginLeft=b.marginLeft||0,e.marginRight=b.marginRight||0,e.marginTop=b.marginTop||0,e.marginBottom=b.marginBottom||0,e.allowGaps=b.allowGaps||0,e.fill=!0,e.allowGaps&&(e.gridSize=parseFloat(mxUtils.getValue(b,"stackUnitSize",20))),e;if("treeLayout"==
-b.childLayout)return e=new mxCompactTreeLayout(this.graph),e.horizontal="1"==mxUtils.getValue(b,"horizontalTree","1"),e.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),e.groupPadding=mxUtils.getValue(b,"parentPadding",20),e.levelDistance=mxUtils.getValue(b,"treeLevelDistance",30),e.maintainParentLocation=!0,e.edgeRouting=!1,e.resetEdges=!1,e;if("flowLayout"==b.childLayout)return e=new mxHierarchicalLayout(this.graph,mxUtils.getValue(b,"flowOrientation",mxConstants.DIRECTION_EAST)),e.resizeParent=
-"1"==mxUtils.getValue(b,"resizeParent","1"),e.parentBorder=mxUtils.getValue(b,"parentPadding",20),e.maintainParentLocation=!0,e.intraCellSpacing=mxUtils.getValue(b,"intraCellSpacing",mxHierarchicalLayout.prototype.intraCellSpacing),e.interRankCellSpacing=mxUtils.getValue(b,"interRankCellSpacing",mxHierarchicalLayout.prototype.interRankCellSpacing),e.interHierarchySpacing=mxUtils.getValue(b,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),e.parallelEdgeSpacing=mxUtils.getValue(b,
-"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),e;if("circleLayout"==b.childLayout)return new mxCircleLayout(this.graph);if("organicLayout"==b.childLayout)return new mxFastOrganicLayout(this.graph);if("tableLayout"==b.childLayout)return new TableLayout(this.graph);if(null!=b.childLayout&&"["==b.childLayout.charAt(0))try{return new mxCompositeLayout(this.graph,this.graph.createLayouts(JSON.parse(b.childLayout)))}catch(m){null!=window.console&&console.error(m)}}return null}};
-Graph.prototype.createLayouts=function(b){for(var e=[],k=0;k<b.length;k++)if(0<=mxUtils.indexOf(Graph.layoutNames,b[k].layout)){var m=new window[b[k].layout](this);if(null!=b[k].config)for(var C in b[k].config)m[C]=b[k].config[C];e.push(m)}else throw Error(mxResources.get("invalidCallFnNotFound",[b[k].layout]));return e};
-Graph.prototype.getDataForCells=function(b){for(var e=[],k=0;k<b.length;k++){var m=null!=b[k].value?b[k].value.attributes:null,C={};C.id=b[k].id;if(null!=m)for(var p=0;p<m.length;p++)C[m[p].nodeName]=m[p].nodeValue;else C.label=this.convertValueToString(b[k]);e.push(C)}return e};
-Graph.prototype.getNodesForCells=function(b){for(var e=[],k=0;k<b.length;k++){var m=this.view.getState(b[k]);if(null!=m){for(var C=this.cellRenderer.getShapesForState(m),p=0;p<C.length;p++)null!=C[p]&&null!=C[p].node&&e.push(C[p].node);null!=m.control&&null!=m.control.node&&e.push(m.control.node)}}return e};
-Graph.prototype.createWipeAnimations=function(b,e){for(var k=[],m=0;m<b.length;m++){var C=this.view.getState(b[m]);null!=C&&null!=C.shape&&(this.model.isEdge(C.cell)&&null!=C.absolutePoints&&1<C.absolutePoints.length?k.push(this.createEdgeWipeAnimation(C,e)):this.model.isVertex(C.cell)&&null!=C.shape.bounds&&k.push(this.createVertexWipeAnimation(C,e)))}return k};
-Graph.prototype.createEdgeWipeAnimation=function(b,e){var k=b.absolutePoints.slice(),m=b.segments,C=b.length,p=k.length;return{execute:mxUtils.bind(this,function(F,L){if(null!=b.shape){var P=[k[0]];L=F/L;e||(L=1-L);for(var d=C*L,f=1;f<p;f++)if(d<=m[f-1]){P.push(new mxPoint(k[f-1].x+(k[f].x-k[f-1].x)*d/m[f-1],k[f-1].y+(k[f].y-k[f-1].y)*d/m[f-1]));break}else d-=m[f-1],P.push(k[f]);b.shape.points=P;b.shape.redraw();0==F&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
-b.text.node&&(b.text.node.style.opacity=L)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.points=k,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};
-Graph.prototype.createVertexWipeAnimation=function(b,e){var k=new mxRectangle.fromRectangle(b.shape.bounds);return{execute:mxUtils.bind(this,function(m,C){null!=b.shape&&(C=m/C,e||(C=1-C),b.shape.bounds=new mxRectangle(k.x,k.y,k.width*C,k.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=C))}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.bounds=k,b.shape.redraw(),null!=b.text&&null!=b.text.node&&
-(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};Graph.prototype.executeAnimations=function(b,e,k,m){k=null!=k?k:30;m=null!=m?m:30;var C=null,p=0,F=mxUtils.bind(this,function(){if(p==k||this.stoppingCustomActions){window.clearInterval(C);for(var L=0;L<b.length;L++)b[L].stop();null!=e&&e()}else for(L=0;L<b.length;L++)b[L].execute(p,k);p++});C=window.setInterval(F,m);F()};
+Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.hasLayout=function(b){return null!=this.graph.getCellStyle(b).childLayout};this.layoutManager.getLayout=function(b,d){var g=this.graph.model.getParent(b);if(!this.graph.isCellCollapsed(b)&&(d!=mxEvent.BEGIN_UPDATE||this.hasLayout(g,d))){b=this.graph.getCellStyle(b);if("stackLayout"==b.childLayout)return d=new mxStackLayout(this.graph,!0),d.resizeParentMax="1"==mxUtils.getValue(b,"resizeParentMax",
+"1"),d.horizontal="1"==mxUtils.getValue(b,"horizontalStack","1"),d.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),d.resizeLast="1"==mxUtils.getValue(b,"resizeLast","0"),d.spacing=b.stackSpacing||d.spacing,d.border=b.stackBorder||d.border,d.marginLeft=b.marginLeft||0,d.marginRight=b.marginRight||0,d.marginTop=b.marginTop||0,d.marginBottom=b.marginBottom||0,d.allowGaps=b.allowGaps||0,d.fill=!0,d.allowGaps&&(d.gridSize=parseFloat(mxUtils.getValue(b,"stackUnitSize",20))),d;if("treeLayout"==
+b.childLayout)return d=new mxCompactTreeLayout(this.graph),d.horizontal="1"==mxUtils.getValue(b,"horizontalTree","1"),d.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),d.groupPadding=mxUtils.getValue(b,"parentPadding",20),d.levelDistance=mxUtils.getValue(b,"treeLevelDistance",30),d.maintainParentLocation=!0,d.edgeRouting=!1,d.resetEdges=!1,d;if("flowLayout"==b.childLayout)return d=new mxHierarchicalLayout(this.graph,mxUtils.getValue(b,"flowOrientation",mxConstants.DIRECTION_EAST)),d.resizeParent=
+"1"==mxUtils.getValue(b,"resizeParent","1"),d.parentBorder=mxUtils.getValue(b,"parentPadding",20),d.maintainParentLocation=!0,d.intraCellSpacing=mxUtils.getValue(b,"intraCellSpacing",mxHierarchicalLayout.prototype.intraCellSpacing),d.interRankCellSpacing=mxUtils.getValue(b,"interRankCellSpacing",mxHierarchicalLayout.prototype.interRankCellSpacing),d.interHierarchySpacing=mxUtils.getValue(b,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),d.parallelEdgeSpacing=mxUtils.getValue(b,
+"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),d;if("circleLayout"==b.childLayout)return new mxCircleLayout(this.graph);if("organicLayout"==b.childLayout)return new mxFastOrganicLayout(this.graph);if("tableLayout"==b.childLayout)return new TableLayout(this.graph);if(null!=b.childLayout&&"["==b.childLayout.charAt(0))try{return new mxCompositeLayout(this.graph,this.graph.createLayouts(JSON.parse(b.childLayout)))}catch(l){null!=window.console&&console.error(l)}}return null}};
+Graph.prototype.createLayouts=function(b){for(var d=[],g=0;g<b.length;g++)if(0<=mxUtils.indexOf(Graph.layoutNames,b[g].layout)){var l=new window[b[g].layout](this);if(null!=b[g].config)for(var D in b[g].config)l[D]=b[g].config[D];d.push(l)}else throw Error(mxResources.get("invalidCallFnNotFound",[b[g].layout]));return d};
+Graph.prototype.getDataForCells=function(b){for(var d=[],g=0;g<b.length;g++){var l=null!=b[g].value?b[g].value.attributes:null,D={};D.id=b[g].id;if(null!=l)for(var p=0;p<l.length;p++)D[l[p].nodeName]=l[p].nodeValue;else D.label=this.convertValueToString(b[g]);d.push(D)}return d};
+Graph.prototype.getNodesForCells=function(b){for(var d=[],g=0;g<b.length;g++){var l=this.view.getState(b[g]);if(null!=l){for(var D=this.cellRenderer.getShapesForState(l),p=0;p<D.length;p++)null!=D[p]&&null!=D[p].node&&d.push(D[p].node);null!=l.control&&null!=l.control.node&&d.push(l.control.node)}}return d};
+Graph.prototype.createWipeAnimations=function(b,d){for(var g=[],l=0;l<b.length;l++){var D=this.view.getState(b[l]);null!=D&&null!=D.shape&&(this.model.isEdge(D.cell)&&null!=D.absolutePoints&&1<D.absolutePoints.length?g.push(this.createEdgeWipeAnimation(D,d)):this.model.isVertex(D.cell)&&null!=D.shape.bounds&&g.push(this.createVertexWipeAnimation(D,d)))}return g};
+Graph.prototype.createEdgeWipeAnimation=function(b,d){var g=b.absolutePoints.slice(),l=b.segments,D=b.length,p=g.length;return{execute:mxUtils.bind(this,function(E,N){if(null!=b.shape){var R=[g[0]];N=E/N;d||(N=1-N);for(var G=D*N,M=1;M<p;M++)if(G<=l[M-1]){R.push(new mxPoint(g[M-1].x+(g[M].x-g[M-1].x)*G/l[M-1],g[M-1].y+(g[M].y-g[M-1].y)*G/l[M-1]));break}else G-=l[M-1],R.push(g[M]);b.shape.points=R;b.shape.redraw();0==E&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
+b.text.node&&(b.text.node.style.opacity=N)}}),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]),d?1:0))})}};
+Graph.prototype.createVertexWipeAnimation=function(b,d){var g=new mxRectangle.fromRectangle(b.shape.bounds);return{execute:mxUtils.bind(this,function(l,D){null!=b.shape&&(D=l/D,d||(D=1-D),b.shape.bounds=new mxRectangle(g.x,g.y,g.width*D,g.height),b.shape.redraw(),0==l&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=D))}),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]),d?1:0))})}};Graph.prototype.executeAnimations=function(b,d,g,l){g=null!=g?g:30;l=null!=l?l:30;var D=null,p=0,E=mxUtils.bind(this,function(){if(p==g||this.stoppingCustomActions){window.clearInterval(D);for(var N=0;N<b.length;N++)b[N].stop();null!=d&&d()}else for(N=0;N<b.length;N++)b[N].execute(p,g);p++});D=window.setInterval(E,l);E()};
Graph.prototype.getPageSize=function(){return this.pageVisible?new mxRectangle(0,0,this.pageFormat.width*this.pageScale,this.pageFormat.height*this.pageScale):this.scrollTileSize};
-Graph.prototype.getPageLayout=function(){var b=this.getPageSize(),e=this.getGraphBounds();if(0==e.width||0==e.height)return new mxRectangle(0,0,1,1);var k=Math.floor(Math.ceil(e.x/this.view.scale-this.view.translate.x)/b.width),m=Math.floor(Math.ceil(e.y/this.view.scale-this.view.translate.y)/b.height);return new mxRectangle(k,m,Math.ceil((Math.floor((e.x+e.width)/this.view.scale)-this.view.translate.x)/b.width)-k,Math.ceil((Math.floor((e.y+e.height)/this.view.scale)-this.view.translate.y)/b.height)-
-m)};Graph.prototype.sanitizeHtml=function(b,e){return Graph.sanitizeHtml(b,e)};Graph.prototype.updatePlaceholders=function(){var b=!1,e;for(e in this.model.cells){var k=this.model.cells[e];this.isReplacePlaceholders(k)&&(this.view.invalidate(k,!1,!1),b=!0)}b&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(b){return null!=b.value&&"object"==typeof b.value&&"1"==b.value.getAttribute("placeholders")};
+Graph.prototype.getPageLayout=function(){var b=this.getPageSize(),d=this.getGraphBounds();if(0==d.width||0==d.height)return new mxRectangle(0,0,1,1);var g=Math.floor(Math.ceil(d.x/this.view.scale-this.view.translate.x)/b.width),l=Math.floor(Math.ceil(d.y/this.view.scale-this.view.translate.y)/b.height);return new mxRectangle(g,l,Math.ceil((Math.floor((d.x+d.width)/this.view.scale)-this.view.translate.x)/b.width)-g,Math.ceil((Math.floor((d.y+d.height)/this.view.scale)-this.view.translate.y)/b.height)-
+l)};Graph.prototype.sanitizeHtml=function(b,d){return Graph.sanitizeHtml(b,d)};Graph.prototype.updatePlaceholders=function(){var b=!1,d;for(d in this.model.cells){var g=this.model.cells[d];this.isReplacePlaceholders(g)&&(this.view.invalidate(g,!1,!1),b=!0)}b&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(b){return null!=b.value&&"object"==typeof b.value&&"1"==b.value.getAttribute("placeholders")};
Graph.prototype.isZoomWheelEvent=function(b){return Graph.zoomWheel&&!mxEvent.isShiftDown(b)&&!mxEvent.isMetaDown(b)&&!mxEvent.isAltDown(b)&&(!mxEvent.isControlDown(b)||mxClient.IS_MAC)||!Graph.zoomWheel&&(mxEvent.isAltDown(b)||mxEvent.isControlDown(b))};Graph.prototype.isScrollWheelEvent=function(b){return!this.isZoomWheelEvent(b)};Graph.prototype.isTransparentClickEvent=function(b){return mxEvent.isAltDown(b)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(b)};
-Graph.prototype.isIgnoreTerminalEvent=function(b){return mxEvent.isAltDown(b)&&!mxEvent.isShiftDown(b)&&!mxEvent.isControlDown(b)&&!mxEvent.isMetaDown(b)};Graph.prototype.isEdgeIgnored=function(b){var e=!1;null!=b&&(b=this.getCurrentCellStyle(b),e="1"==mxUtils.getValue(b,"ignoreEdge","0"));return e};Graph.prototype.isSplitTarget=function(b,e,k){return!this.model.isEdge(e[0])&&!mxEvent.isAltDown(k)&&!mxEvent.isShiftDown(k)&&mxGraph.prototype.isSplitTarget.apply(this,arguments)};
-Graph.prototype.getLabel=function(b){var e=mxGraph.prototype.getLabel.apply(this,arguments);null!=e&&this.isReplacePlaceholders(b)&&null==b.getAttribute("placeholder")&&(e=this.replacePlaceholders(b,e));return e};Graph.prototype.isLabelMovable=function(b){var e=this.getCurrentCellStyle(b);return!this.isCellLocked(b)&&(this.model.isEdge(b)&&this.edgeLabelsMovable||this.model.isVertex(b)&&(this.vertexLabelsMovable||"1"==mxUtils.getValue(e,"labelMovable","0")))};
-Graph.prototype.setGridSize=function(b){this.gridSize=b;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.setDefaultParent=function(b){this.defaultParent=b;this.fireEvent(new mxEventObject("defaultParentChanged"))};Graph.prototype.getClickableLinkForCell=function(b){do{var e=this.getLinkForCell(b);if(null!=e)return e;b=this.model.getParent(b)}while(null!=b);return null};
-Graph.prototype.getGlobalVariable=function(b){var e=null;"date"==b?e=(new Date).toLocaleDateString():"time"==b?e=(new Date).toLocaleTimeString():"timestamp"==b?e=(new Date).toLocaleString():"date{"==b.substring(0,5)&&(b=b.substring(5,b.length-1),e=this.formatDate(new Date,b));return e};
-Graph.prototype.formatDate=function(b,e,k){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
-shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var m=this.dateFormatCache,C=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,p=/[^-+\dA-Z]/g,F=function(I,H){I=String(I);for(H=H||2;I.length<H;)I="0"+I;return I};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),k=!0);var L=k?"getUTC":"get",P=b[L+"Date"](),d=b[L+"Day"](),f=b[L+"Month"](),g=b[L+"FullYear"](),x=b[L+"Hours"](),y=b[L+"Minutes"](),t=b[L+"Seconds"]();L=b[L+"Milliseconds"]();var G=k?0:b.getTimezoneOffset(),D={d:P,dd:F(P),ddd:m.i18n.dayNames[d],dddd:m.i18n.dayNames[d+7],m:f+1,mm:F(f+1),mmm:m.i18n.monthNames[f],mmmm:m.i18n.monthNames[f+
-12],yy:String(g).slice(2),yyyy:g,h:x%12||12,hh:F(x%12||12),H:x,HH:F(x),M:y,MM:F(y),s:t,ss:F(t),l:F(L,3),L:F(99<L?Math.round(L/10):L),t:12>x?"a":"p",tt:12>x?"am":"pm",T:12>x?"A":"P",TT:12>x?"AM":"PM",Z:k?"UTC":(String(b).match(C)||[""]).pop().replace(p,""),o:(0<G?"-":"+")+F(100*Math.floor(Math.abs(G)/60)+Math.abs(G)%60,4),S:["th","st","nd","rd"][3<P%10?0:(10!=P%100-P%10)*P%10]};return e.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(I){return I in D?D[I]:I.slice(1,
-I.length-1)})};Graph.prototype.getLayerForCells=function(b){var e=null;if(0<b.length){for(e=b[0];!this.model.isLayer(e);)e=this.model.getParent(e);for(var k=1;k<b.length;k++)if(!this.model.isAncestor(e,b[k])){e=null;break}}return e};
-Graph.prototype.createLayersDialog=function(b,e){var k=document.createElement("div");k.style.position="absolute";for(var m=this.getModel(),C=m.getChildCount(m.root),p=0;p<C;p++)mxUtils.bind(this,function(F){function L(){m.isVisible(F)?(f.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(d,75)):(f.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(d,25))}var P=this.convertValueToString(F)||mxResources.get("background")||"Background",d=document.createElement("div");d.style.overflow=
-"hidden";d.style.textOverflow="ellipsis";d.style.padding="2px";d.style.whiteSpace="nowrap";d.style.cursor="pointer";d.setAttribute("title",mxResources.get(m.isVisible(F)?"hideIt":"show",[P]));var f=document.createElement("img");f.setAttribute("draggable","false");f.setAttribute("align","absmiddle");f.setAttribute("border","0");f.style.position="relative";f.style.width="16px";f.style.padding="0px 6px 0 4px";e&&(f.style.filter="invert(100%)",f.style.top="-2px");d.appendChild(f);mxUtils.write(d,P);k.appendChild(d);
-mxEvent.addListener(d,"click",function(){m.setVisible(F,!m.isVisible(F));L();null!=b&&b(F)});L()})(m.getChildAt(m.root,p));return k};
-Graph.prototype.replacePlaceholders=function(b,e,k,m){m=[];if(null!=e){for(var C=0;match=this.placeholderPattern.exec(e);){var p=match[0];if(2<p.length&&"%label%"!=p&&"%tooltip%"!=p){var F=null;if(match.index>C&&"%"==e.charAt(match.index-1))F=p.substring(1);else{var L=p.substring(1,p.length-1);if("id"==L)F=b.id;else if(0>L.indexOf("{"))for(var P=b;null==F&&null!=P;)null!=P.value&&"object"==typeof P.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(F=P.getAttribute(L+"_"+Graph.diagramLanguage)),
-null==F&&(F=P.hasAttribute(L)?null!=P.getAttribute(L)?P.getAttribute(L):"":null)),P=this.model.getParent(P);null==F&&(F=this.getGlobalVariable(L));null==F&&null!=k&&(F=k[L])}m.push(e.substring(C,match.index)+(null!=F?F:p));C=match.index+p.length}}m.push(e.substring(C))}return m.join("")};Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var e=[],k=0;k<b.length;k++){var m=this.model.getCell(b[k].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 k=!1;if(this.isTableCell(b)&&this.isTableCell(e)){var m=this.model.getParent(b),C=this.model.getParent(m),p=this.model.getParent(e);if(C==this.model.getParent(p)){b=m.getIndex(b);m=C.getIndex(m);var F=p.getIndex(e),L=C.getIndex(p);p=Math.max(m,L);e=Math.min(b,F);b=Math.max(b,F);F=[];for(m=Math.min(m,L);m<=p;m++){L=this.model.getChildAt(C,m);for(var P=e;P<=b;P++)F.push(this.model.getChildAt(L,P))}0<F.length&&(1<F.length||1<this.getSelectionCount()||
-!this.isCellSelected(F[0]))&&(this.setSelectionCells(F),k=!0)}}return k};
-Graph.prototype.snapCellsToGrid=function(b,e){this.getModel().beginUpdate();try{for(var k=0;k<b.length;k++){var m=b[k],C=this.getCellGeometry(m);if(null!=C){C=C.clone();if(this.getModel().isVertex(m))C.x=Math.round(C.x/e)*e,C.y=Math.round(C.y/e)*e,C.width=Math.round(C.width/e)*e,C.height=Math.round(C.height/e)*e;else if(this.getModel().isEdge(m)&&null!=C.points)for(var p=0;p<C.points.length;p++)C.points[p].x=Math.round(C.points[p].x/e)*e,C.points[p].y=Math.round(C.points[p].y/e)*e;this.getModel().setGeometry(m,
-C)}}}finally{this.getModel().endUpdate()}};Graph.prototype.selectCellsForConnectVertex=function(b,e,k){2==b.length&&this.model.isVertex(b[1])?(this.setSelectionCell(b[1]),this.scrollCellToVisible(b[1]),null!=k&&(mxEvent.isTouchEvent(e)?k.update(k.getState(this.view.getState(b[1]))):k.reset())):this.setSelectionCells(b)};
-Graph.prototype.isCloneConnectSource=function(b){var e=null;null!=this.layoutManager&&(e=this.layoutManager.getLayout(this.model.getParent(b)));return this.isTableRow(b)||this.isTableCell(b)||null!=e&&e.constructor==mxStackLayout};
-Graph.prototype.connectVertex=function(b,e,k,m,C,p,F,L){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 P=this.isCloneConnectSource(b),d=P?b:this.getCompositeParent(b),f=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(d.geometry.x,d.geometry.y);e==mxConstants.DIRECTION_NORTH?(f.x+=d.geometry.width/2,f.y-=k):e==
-mxConstants.DIRECTION_SOUTH?(f.x+=d.geometry.width/2,f.y+=d.geometry.height+k):(f.x=e==mxConstants.DIRECTION_WEST?f.x-k:f.x+(d.geometry.width+k),f.y+=d.geometry.height/2);var g=this.view.getState(this.model.getParent(b));k=this.view.scale;var x=this.view.translate;d=x.x*k;x=x.y*k;null!=g&&this.model.isVertex(g.cell)&&(d=g.x,x=g.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(f.x+=b.parent.geometry.x,f.y+=b.parent.geometry.y);p=p?null:(new mxRectangle(d+f.x*k,x+f.y*k)).grow(40*k);p=null!=p?
-this.getCells(0,0,0,0,null,null,p,null,!0):null;g=this.view.getState(b);var y=null,t=null;if(null!=p){p=p.reverse();for(var G=0;G<p.length;G++)if(!this.isCellLocked(p[G])&&!this.model.isEdge(p[G])&&p[G]!=b)if(!this.model.isAncestor(b,p[G])&&this.isContainer(p[G])&&(null==y||p[G]==this.model.getParent(b)))y=p[G];else if(null==t&&this.isCellConnectable(p[G])&&!this.model.isAncestor(p[G],b)&&!this.isSwimlane(p[G])){var D=this.view.getState(p[G]);null==g||null==D||mxUtils.intersects(g,D)||(t=p[G])}}var I=
-!mxEvent.isShiftDown(m)||mxEvent.isControlDown(m)||C;I&&("1"!=urlParams.sketch||C)&&(e==mxConstants.DIRECTION_NORTH?f.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?f.y+=b.geometry.height/2:f.x=e==mxConstants.DIRECTION_WEST?f.x-b.geometry.width/2:f.x+b.geometry.width/2);var H=[],S=t;t=y;C=mxUtils.bind(this,function(T){if(null==F||null!=T||null==t&&P){this.model.beginUpdate();try{if(null==S&&I){var M=this.getAbsoluteParent(null!=T?T:b);M=P?b:this.getCompositeParent(M);S=null!=T?T:this.duplicateCells([M],
-!1)[0];null!=T&&this.addCells([S],this.model.getParent(b),null,null,null,!0);var fa=this.getCellGeometry(S);null!=fa&&(null!=T&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?f.y-=fa.height/2:e==mxConstants.DIRECTION_SOUTH?f.y+=fa.height/2:f.x=e==mxConstants.DIRECTION_WEST?f.x-fa.width/2:f.x+fa.width/2),fa.x=f.x-fa.width/2,fa.y=f.y-fa.height/2);null!=y?(this.addCells([S],y,null,null,null,!0),t=null):I&&!P&&this.addCells([S],this.getDefaultParent(),null,null,null,!0)}var la=mxEvent.isControlDown(m)&&
-mxEvent.isShiftDown(m)&&I||null==t&&P?null:this.insertEdge(this.model.getParent(b),null,"",b,S,this.createCurrentEdgeStyle());if(null!=la&&this.connectionHandler.insertBeforeSource){var ra=null;for(T=b;null!=T.parent&&null!=T.geometry&&T.geometry.relative&&T.parent!=la.parent;)T=this.model.getParent(T);null!=T&&null!=T.parent&&T.parent==la.parent&&(ra=T.parent.getIndex(T),this.model.add(T.parent,la,ra))}null==t&&null!=S&&null!=b.parent&&P&&e==mxConstants.DIRECTION_WEST&&(ra=b.parent.getIndex(b),this.model.add(b.parent,
-S,ra));null!=la&&H.push(la);null==t&&null!=S&&H.push(S);null==S&&null!=la&&la.geometry.setTerminalPoint(f,!1);null!=la&&this.fireEvent(new mxEventObject("cellsInserted","cells",[la]))}finally{this.model.endUpdate()}}if(null!=L)L(H);else return H});if(null==F||null!=S||!I||null==t&&P)return C(S);F(d+f.x*k,x+f.y*k,C)};
-Graph.prototype.getIndexableText=function(b){b=null!=b?b:this.model.getDescendants(this.model.root);for(var e=document.createElement("div"),k=[],m,C=0;C<b.length;C++)if(m=b[C],this.model.isVertex(m)||this.model.isEdge(m))this.isHtmlLabel(m)?(e.innerHTML=this.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&&k.push(m);return k.join(" ")};
-Graph.prototype.convertValueToString=function(b){var e=this.model.getValue(b);if(null!=e&&"object"==typeof e){var k=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder")){e=b.getAttribute("placeholder");for(var m=b;null==k&&null!=m;)null!=m.value&&"object"==typeof m.value&&(k=m.hasAttribute(e)?null!=m.getAttribute(e)?m.getAttribute(e):"":null),m=this.model.getParent(m)}else k=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(k=e.getAttribute("label_"+Graph.diagramLanguage)),
-null==k&&(k=e.getAttribute("label")||"");return k||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(b){return null!=b&&null!=b.text&&null!=b.text.node?b.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(b){return null!=b.value&&"object"==typeof b.value?(b=b.value.getAttribute("link"),null!=b&&"javascript:"===b.toLowerCase().substring(0,11)&&(b=b.substring(11)),b):null};
-Graph.prototype.getLinkTargetForCell=function(b){return null!=b.value&&"object"==typeof b.value?b.value.getAttribute("linkTarget"):null};Graph.prototype.postProcessCellStyle=function(b,e){return this.updateHorizontalStyle(b,this.replaceDefaultColors(b,mxGraph.prototype.postProcessCellStyle.apply(this,arguments)))};
-Graph.prototype.updateHorizontalStyle=function(b,e){if(null!=b&&null!=e&&null!=this.layoutManager){var k=this.model.getParent(b);this.model.isVertex(k)&&this.isCellCollapsed(b)&&(b=this.layoutManager.getLayout(k),null!=b&&b.constructor==mxStackLayout&&(e[mxConstants.STYLE_HORIZONTAL]=!b.horizontal))}return e};
-Graph.prototype.replaceDefaultColors=function(b,e){if(null!=e){b=mxUtils.hex2rgb(this.shapeBackgroundColor);var k=mxUtils.hex2rgb(this.shapeForegroundColor);this.replaceDefaultColor(e,mxConstants.STYLE_FONTCOLOR,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_FILLCOLOR,b,k);this.replaceDefaultColor(e,mxConstants.STYLE_GRADIENTCOLOR,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_STROKECOLOR,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_IMAGE_BORDER,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_IMAGE_BACKGROUND,
-b,k);this.replaceDefaultColor(e,mxConstants.STYLE_LABEL_BORDERCOLOR,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_SWIMLANE_FILLCOLOR,b,k);this.replaceDefaultColor(e,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,b,k)}return e};Graph.prototype.replaceDefaultColor=function(b,e,k,m){null!=b&&"default"==b[e]&&null!=k&&(b[e]=this.getDefaultColor(b,e,k,m))};Graph.prototype.getDefaultColor=function(b,e,k,m){e="default"+e.charAt(0).toUpperCase()+e.substring(1);"invert"==b[e]&&(k=m);return k};
-Graph.prototype.updateAlternateBounds=function(b,e,k){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,k,m,C){e=null!=e?e:!1;null==k&&(k=this.getFoldableCells(this.getSelectionCells(),b));if(null!=k){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var p=0;p<k.length;p++){var F=this.view.getState(k[p]),L=this.getCellGeometry(k[p]);if(null!=F&&null!=L){var P=Math.round(L.width-F.width/this.view.scale),d=Math.round(L.height-F.height/this.view.scale);if(0!=d||0!=P){var f=this.model.getParent(k[p]),g=this.layoutManager.getLayout(f);
-null==g?null!=C&&this.isMoveCellsEvent(C,F)&&this.moveSiblings(F,f,P,d):null!=C&&mxEvent.isAltDown(C)||g.constructor!=mxStackLayout||g.resizeLast||this.resizeParentStacks(f,g,P,d)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(k)}};
-Graph.prototype.moveSiblings=function(b,e,k,m){this.model.beginUpdate();try{var C=this.getCellsBeyond(b.x,b.y,e,!0,!0);for(e=0;e<C.length;e++)if(C[e]!=b.cell){var p=this.view.getState(C[e]),F=this.getCellGeometry(C[e]);null!=p&&null!=F&&(F=F.clone(),F.translate(Math.round(k*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(C[e],F))}}finally{this.model.endUpdate()}};
-Graph.prototype.resizeParentStacks=function(b,e,k,m){if(null!=this.layoutManager&&null!=e&&e.constructor==mxStackLayout&&!e.resizeLast){this.model.beginUpdate();try{for(var C=e.horizontal;null!=b&&null!=e&&e.constructor==mxStackLayout&&e.horizontal==C&&!e.resizeLast;){var p=this.getCellGeometry(b),F=this.view.getState(b);null!=F&&null!=p&&(p=p.clone(),e.horizontal?p.width+=k+Math.min(0,F.width/this.view.scale-p.width):p.height+=m+Math.min(0,F.height/this.view.scale-p.height),this.model.setGeometry(b,
-p));b=this.model.getParent(b);e=this.layoutManager.getLayout(b)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(b){var e=this.getCurrentCellStyle(b);return this.isSwimlane(b)?"0"!=e.container:"1"==e.container};Graph.prototype.isCellConnectable=function(b){var e=this.getCurrentCellStyle(b);return null!=e.connectable?"0"!=e.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
-Graph.prototype.isLabelMovable=function(b){var e=this.getCurrentCellStyle(b);return null!=e.movableLabel?"0"!=e.movableLabel:mxGraph.prototype.isLabelMovable.apply(this,arguments)};Graph.prototype.selectAll=function(b){b=b||this.getDefaultParent();this.isCellLocked(b)||mxGraph.prototype.selectAll.apply(this,arguments)};Graph.prototype.selectCells=function(b,e,k){k=k||this.getDefaultParent();this.isCellLocked(k)||mxGraph.prototype.selectCells.apply(this,arguments)};
-Graph.prototype.getSwimlaneAt=function(b,e,k){var m=mxGraph.prototype.getSwimlaneAt.apply(this,arguments);this.isCellLocked(m)&&(m=null);return m};Graph.prototype.isCellFoldable=function(b){var e=this.getCurrentCellStyle(b);return this.foldingEnabled&&"0"!=mxUtils.getValue(e,mxConstants.STYLE_RESIZABLE,"1")&&("1"==e.treeFolding||!this.isCellLocked(b)&&(this.isContainer(b)&&"0"!=e.collapsible||!this.isContainer(b)&&"1"==e.collapsible))};
-Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()};Graph.prototype.zoom=function(b,e){b=Math.max(.01,Math.min(this.view.scale*b,160))/this.view.scale;mxGraph.prototype.zoom.apply(this,arguments)};Graph.prototype.zoomIn=function(){.15>this.view.scale?this.zoom((this.view.scale+.01)/this.view.scale):this.zoom(Math.round(this.view.scale*this.zoomFactor*20)/20/this.view.scale)};
+Graph.prototype.isIgnoreTerminalEvent=function(b){return mxEvent.isAltDown(b)&&!mxEvent.isShiftDown(b)&&!mxEvent.isControlDown(b)&&!mxEvent.isMetaDown(b)};Graph.prototype.isEdgeIgnored=function(b){var d=!1;null!=b&&(b=this.getCurrentCellStyle(b),d="1"==mxUtils.getValue(b,"ignoreEdge","0"));return d};Graph.prototype.isSplitTarget=function(b,d,g){return!this.model.isEdge(d[0])&&!mxEvent.isAltDown(g)&&!mxEvent.isShiftDown(g)&&mxGraph.prototype.isSplitTarget.apply(this,arguments)};
+Graph.prototype.getLabel=function(b){var d=mxGraph.prototype.getLabel.apply(this,arguments);null!=d&&this.isReplacePlaceholders(b)&&null==b.getAttribute("placeholder")&&(d=this.replacePlaceholders(b,d));return d};Graph.prototype.isLabelMovable=function(b){var d=this.getCurrentCellStyle(b);return!this.isCellLocked(b)&&(this.model.isEdge(b)&&this.edgeLabelsMovable||this.model.isVertex(b)&&(this.vertexLabelsMovable||"1"==mxUtils.getValue(d,"labelMovable","0")))};
+Graph.prototype.setGridSize=function(b){this.gridSize=b;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.setDefaultParent=function(b){this.defaultParent=b;this.fireEvent(new mxEventObject("defaultParentChanged"))};Graph.prototype.getClickableLinkForCell=function(b){do{var d=this.getLinkForCell(b);if(null!=d)return d;b=this.model.getParent(b)}while(null!=b);return null};
+Graph.prototype.getGlobalVariable=function(b){var d=null;"date"==b?d=(new Date).toLocaleDateString():"time"==b?d=(new Date).toLocaleTimeString():"timestamp"==b?d=(new Date).toLocaleString():"date{"==b.substring(0,5)&&(b=b.substring(5,b.length-1),d=this.formatDate(new Date,b));return d};
+Graph.prototype.formatDate=function(b,d,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 l=this.dateFormatCache,D=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,p=/[^-+\dA-Z]/g,E=function(B,I){B=String(B);for(I=I||2;B.length<I;)B="0"+B;return B};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||
+/\d/.test(b)||(d=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");d=String(l.masks[d]||d||l.masks["default"]);"UTC:"==d.slice(0,4)&&(d=d.slice(4),g=!0);var N=g?"getUTC":"get",R=b[N+"Date"](),G=b[N+"Day"](),M=b[N+"Month"](),Q=b[N+"FullYear"](),e=b[N+"Hours"](),f=b[N+"Minutes"](),k=b[N+"Seconds"]();N=b[N+"Milliseconds"]();var z=g?0:b.getTimezoneOffset(),t={d:R,dd:E(R),ddd:l.i18n.dayNames[G],dddd:l.i18n.dayNames[G+7],m:M+1,mm:E(M+1),mmm:l.i18n.monthNames[M],mmmm:l.i18n.monthNames[M+
+12],yy:String(Q).slice(2),yyyy:Q,h:e%12||12,hh:E(e%12||12),H:e,HH:E(e),M:f,MM:E(f),s:k,ss:E(k),l:E(N,3),L:E(99<N?Math.round(N/10):N),t:12>e?"a":"p",tt:12>e?"am":"pm",T:12>e?"A":"P",TT:12>e?"AM":"PM",Z:g?"UTC":(String(b).match(D)||[""]).pop().replace(p,""),o:(0<z?"-":"+")+E(100*Math.floor(Math.abs(z)/60)+Math.abs(z)%60,4),S:["th","st","nd","rd"][3<R%10?0:(10!=R%100-R%10)*R%10]};return d.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(B){return B in t?t[B]:B.slice(1,
+B.length-1)})};Graph.prototype.getLayerForCells=function(b){var d=null;if(0<b.length){for(d=b[0];!this.model.isLayer(d);)d=this.model.getParent(d);for(var g=1;g<b.length;g++)if(!this.model.isAncestor(d,b[g])){d=null;break}}return d};
+Graph.prototype.createLayersDialog=function(b,d){var g=document.createElement("div");g.style.position="absolute";for(var l=this.getModel(),D=l.getChildCount(l.root),p=0;p<D;p++)mxUtils.bind(this,function(E){function N(){l.isVisible(E)?(M.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(G,75)):(M.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(G,25))}var R=this.convertValueToString(E)||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(l.isVisible(E)?"hideIt":"show",[R]));var M=document.createElement("img");M.setAttribute("draggable","false");M.setAttribute("align","absmiddle");M.setAttribute("border","0");M.style.position="relative";M.style.width="16px";M.style.padding="0px 6px 0 4px";d&&(M.style.filter="invert(100%)",M.style.top="-2px");G.appendChild(M);mxUtils.write(G,R);g.appendChild(G);
+mxEvent.addListener(G,"click",function(){l.setVisible(E,!l.isVisible(E));N();null!=b&&b(E)});N()})(l.getChildAt(l.root,p));return g};
+Graph.prototype.replacePlaceholders=function(b,d,g,l){l=[];if(null!=d){for(var D=0;match=this.placeholderPattern.exec(d);){var p=match[0];if(2<p.length&&"%label%"!=p&&"%tooltip%"!=p){var E=null;if(match.index>D&&"%"==d.charAt(match.index-1))E=p.substring(1);else{var N=p.substring(1,p.length-1);if("id"==N)E=b.id;else if(0>N.indexOf("{"))for(var R=b;null==E&&null!=R;)null!=R.value&&"object"==typeof R.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(E=R.getAttribute(N+"_"+Graph.diagramLanguage)),
+null==E&&(E=R.hasAttribute(N)?null!=R.getAttribute(N)?R.getAttribute(N):"":null)),R=this.model.getParent(R);null==E&&(E=this.getGlobalVariable(N));null==E&&null!=g&&(E=g[N])}l.push(d.substring(D,match.index)+(null!=E?E:p));D=match.index+p.length}}l.push(d.substring(D))}return l.join("")};Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var d=[],g=0;g<b.length;g++){var l=this.model.getCell(b[g].id);null!=l&&d.push(l)}this.setSelectionCells(d)}else this.clearSelection()};
+Graph.prototype.selectCellForEvent=function(b,d){mxEvent.isShiftDown(d)&&!this.isSelectionEmpty()&&this.selectTableRange(this.getSelectionCell(),b)||mxGraph.prototype.selectCellForEvent.apply(this,arguments)};
+Graph.prototype.selectTableRange=function(b,d){var g=!1;if(this.isTableCell(b)&&this.isTableCell(d)){var l=this.model.getParent(b),D=this.model.getParent(l),p=this.model.getParent(d);if(D==this.model.getParent(p)){b=l.getIndex(b);l=D.getIndex(l);var E=p.getIndex(d),N=D.getIndex(p);p=Math.max(l,N);d=Math.min(b,E);b=Math.max(b,E);E=[];for(l=Math.min(l,N);l<=p;l++){N=this.model.getChildAt(D,l);for(var R=d;R<=b;R++)E.push(this.model.getChildAt(N,R))}0<E.length&&(1<E.length||1<this.getSelectionCount()||
+!this.isCellSelected(E[0]))&&(this.setSelectionCells(E),g=!0)}}return g};
+Graph.prototype.snapCellsToGrid=function(b,d){this.getModel().beginUpdate();try{for(var g=0;g<b.length;g++){var l=b[g],D=this.getCellGeometry(l);if(null!=D){D=D.clone();if(this.getModel().isVertex(l))D.x=Math.round(D.x/d)*d,D.y=Math.round(D.y/d)*d,D.width=Math.round(D.width/d)*d,D.height=Math.round(D.height/d)*d;else if(this.getModel().isEdge(l)&&null!=D.points)for(var p=0;p<D.points.length;p++)D.points[p].x=Math.round(D.points[p].x/d)*d,D.points[p].y=Math.round(D.points[p].y/d)*d;this.getModel().setGeometry(l,
+D)}}}finally{this.getModel().endUpdate()}};Graph.prototype.selectCellsForConnectVertex=function(b,d,g){2==b.length&&this.model.isVertex(b[1])?(this.setSelectionCell(b[1]),this.scrollCellToVisible(b[1]),null!=g&&(mxEvent.isTouchEvent(d)?g.update(g.getState(this.view.getState(b[1]))):g.reset())):this.setSelectionCells(b)};
+Graph.prototype.isCloneConnectSource=function(b){var d=null;null!=this.layoutManager&&(d=this.layoutManager.getLayout(this.model.getParent(b)));return this.isTableRow(b)||this.isTableCell(b)||null!=d&&d.constructor==mxStackLayout};
+Graph.prototype.connectVertex=function(b,d,g,l,D,p,E,N){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 R=this.isCloneConnectSource(b),G=R?b:this.getCompositeParent(b),M=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);d==mxConstants.DIRECTION_NORTH?(M.x+=G.geometry.width/2,M.y-=g):d==
+mxConstants.DIRECTION_SOUTH?(M.x+=G.geometry.width/2,M.y+=G.geometry.height+g):(M.x=d==mxConstants.DIRECTION_WEST?M.x-g:M.x+(G.geometry.width+g),M.y+=G.geometry.height/2);var Q=this.view.getState(this.model.getParent(b));g=this.view.scale;var e=this.view.translate;G=e.x*g;e=e.y*g;null!=Q&&this.model.isVertex(Q.cell)&&(G=Q.x,e=Q.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(M.x+=b.parent.geometry.x,M.y+=b.parent.geometry.y);p=p?null:(new mxRectangle(G+M.x*g,e+M.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,k=null;if(null!=p){p=p.reverse();for(var z=0;z<p.length;z++)if(!this.isCellLocked(p[z])&&!this.model.isEdge(p[z])&&p[z]!=b)if(!this.model.isAncestor(b,p[z])&&this.isContainer(p[z])&&(null==f||p[z]==this.model.getParent(b)))f=p[z];else if(null==k&&this.isCellConnectable(p[z])&&!this.model.isAncestor(p[z],b)&&!this.isSwimlane(p[z])){var t=this.view.getState(p[z]);null==Q||null==t||mxUtils.intersects(Q,t)||(k=p[z])}}var B=
+!mxEvent.isShiftDown(l)||mxEvent.isControlDown(l)||D;B&&("1"!=urlParams.sketch||D)&&(d==mxConstants.DIRECTION_NORTH?M.y-=b.geometry.height/2:d==mxConstants.DIRECTION_SOUTH?M.y+=b.geometry.height/2:M.x=d==mxConstants.DIRECTION_WEST?M.x-b.geometry.width/2:M.x+b.geometry.width/2);var I=[],O=k;k=f;D=mxUtils.bind(this,function(J){if(null==E||null!=J||null==k&&R){this.model.beginUpdate();try{if(null==O&&B){var y=this.getAbsoluteParent(null!=J?J:b);y=R?b:this.getCompositeParent(y);O=null!=J?J:this.duplicateCells([y],
+!1)[0];null!=J&&this.addCells([O],this.model.getParent(b),null,null,null,!0);var ia=this.getCellGeometry(O);null!=ia&&(null!=J&&"1"==urlParams.sketch&&(d==mxConstants.DIRECTION_NORTH?M.y-=ia.height/2:d==mxConstants.DIRECTION_SOUTH?M.y+=ia.height/2:M.x=d==mxConstants.DIRECTION_WEST?M.x-ia.width/2:M.x+ia.width/2),ia.x=M.x-ia.width/2,ia.y=M.y-ia.height/2);null!=f?(this.addCells([O],f,null,null,null,!0),k=null):B&&!R&&this.addCells([O],this.getDefaultParent(),null,null,null,!0)}var da=mxEvent.isControlDown(l)&&
+mxEvent.isShiftDown(l)&&B||null==k&&R?null:this.insertEdge(this.model.getParent(b),null,"",b,O,this.createCurrentEdgeStyle());if(null!=da&&this.connectionHandler.insertBeforeSource){var ja=null;for(J=b;null!=J.parent&&null!=J.geometry&&J.geometry.relative&&J.parent!=da.parent;)J=this.model.getParent(J);null!=J&&null!=J.parent&&J.parent==da.parent&&(ja=J.parent.getIndex(J),this.model.add(J.parent,da,ja))}null==k&&null!=O&&null!=b.parent&&R&&d==mxConstants.DIRECTION_WEST&&(ja=b.parent.getIndex(b),this.model.add(b.parent,
+O,ja));null!=da&&I.push(da);null==k&&null!=O&&I.push(O);null==O&&null!=da&&da.geometry.setTerminalPoint(M,!1);null!=da&&this.fireEvent(new mxEventObject("cellsInserted","cells",[da]))}finally{this.model.endUpdate()}}if(null!=N)N(I);else return I});if(null==E||null!=O||!B||null==k&&R)return D(O);E(G+M.x*g,e+M.y*g,D)};
+Graph.prototype.getIndexableText=function(b){b=null!=b?b:this.model.getDescendants(this.model.root);for(var d=document.createElement("div"),g=[],l,D=0;D<b.length;D++)if(l=b[D],this.model.isVertex(l)||this.model.isEdge(l))this.isHtmlLabel(l)?(d.innerHTML=Graph.sanitizeHtml(this.getLabel(l)),l=mxUtils.extractTextWithWhitespace([d])):l=this.getLabel(l),l=mxUtils.trim(l.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<l.length&&g.push(l);return g.join(" ")};
+Graph.prototype.convertValueToString=function(b){var d=this.model.getValue(b);if(null!=d&&"object"==typeof d){var g=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder")){d=b.getAttribute("placeholder");for(var l=b;null==g&&null!=l;)null!=l.value&&"object"==typeof l.value&&(g=l.hasAttribute(d)?null!=l.getAttribute(d)?l.getAttribute(d):"":null),l=this.model.getParent(l)}else g=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(g=d.getAttribute("label_"+Graph.diagramLanguage)),
+null==g&&(g=d.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){return null!=b.value&&"object"==typeof b.value?(b=b.value.getAttribute("link"),null!=b&&"javascript:"===b.toLowerCase().substring(0,11)&&(b=b.substring(11)),b):null};
+Graph.prototype.getLinkTargetForCell=function(b){return null!=b.value&&"object"==typeof b.value?b.value.getAttribute("linkTarget"):null};Graph.prototype.postProcessCellStyle=function(b,d){return this.updateHorizontalStyle(b,this.replaceDefaultColors(b,mxGraph.prototype.postProcessCellStyle.apply(this,arguments)))};
+Graph.prototype.updateHorizontalStyle=function(b,d){if(null!=b&&null!=d&&null!=this.layoutManager){var g=this.model.getParent(b);this.model.isVertex(g)&&this.isCellCollapsed(b)&&(b=this.layoutManager.getLayout(g),null!=b&&b.constructor==mxStackLayout&&(d[mxConstants.STYLE_HORIZONTAL]=!b.horizontal))}return d};
+Graph.prototype.replaceDefaultColors=function(b,d){if(null!=d){b=mxUtils.hex2rgb(this.shapeBackgroundColor);var g=mxUtils.hex2rgb(this.shapeForegroundColor);this.replaceDefaultColor(d,mxConstants.STYLE_FONTCOLOR,g,b);this.replaceDefaultColor(d,mxConstants.STYLE_FILLCOLOR,b,g);this.replaceDefaultColor(d,mxConstants.STYLE_GRADIENTCOLOR,g,b);this.replaceDefaultColor(d,mxConstants.STYLE_STROKECOLOR,g,b);this.replaceDefaultColor(d,mxConstants.STYLE_IMAGE_BORDER,g,b);this.replaceDefaultColor(d,mxConstants.STYLE_IMAGE_BACKGROUND,
+b,g);this.replaceDefaultColor(d,mxConstants.STYLE_LABEL_BORDERCOLOR,g,b);this.replaceDefaultColor(d,mxConstants.STYLE_SWIMLANE_FILLCOLOR,b,g);this.replaceDefaultColor(d,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,b,g)}return d};Graph.prototype.replaceDefaultColor=function(b,d,g,l){null!=b&&"default"==b[d]&&null!=g&&(b[d]=this.getDefaultColor(b,d,g,l))};Graph.prototype.getDefaultColor=function(b,d,g,l){d="default"+d.charAt(0).toUpperCase()+d.substring(1);"invert"==b[d]&&(g=l);return g};
+Graph.prototype.updateAlternateBounds=function(b,d,g){if(null!=b&&null!=d&&null!=this.layoutManager&&null!=d.alternateBounds){var l=this.layoutManager.getLayout(this.model.getParent(b));null!=l&&l.constructor==mxStackLayout&&(l.horizontal?d.alternateBounds.height=0:d.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(b,d){return mxEvent.isShiftDown(b)||"1"==mxUtils.getValue(d.style,"moveCells","0")};
+Graph.prototype.foldCells=function(b,d,g,l,D){d=null!=d?d:!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 E=this.view.getState(g[p]),N=this.getCellGeometry(g[p]);if(null!=E&&null!=N){var R=Math.round(N.width-E.width/this.view.scale),G=Math.round(N.height-E.height/this.view.scale);if(0!=G||0!=R){var M=this.model.getParent(g[p]),Q=this.layoutManager.getLayout(M);
+null==Q?null!=D&&this.isMoveCellsEvent(D,E)&&this.moveSiblings(E,M,R,G):null!=D&&mxEvent.isAltDown(D)||Q.constructor!=mxStackLayout||Q.resizeLast||this.resizeParentStacks(M,Q,R,G)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(g)}};
+Graph.prototype.moveSiblings=function(b,d,g,l){this.model.beginUpdate();try{var D=this.getCellsBeyond(b.x,b.y,d,!0,!0);for(d=0;d<D.length;d++)if(D[d]!=b.cell){var p=this.view.getState(D[d]),E=this.getCellGeometry(D[d]);null!=p&&null!=E&&(E=E.clone(),E.translate(Math.round(g*Math.max(0,Math.min(1,(p.x-b.x)/b.width))),Math.round(l*Math.max(0,Math.min(1,(p.y-b.y)/b.height)))),this.model.setGeometry(D[d],E))}}finally{this.model.endUpdate()}};
+Graph.prototype.resizeParentStacks=function(b,d,g,l){if(null!=this.layoutManager&&null!=d&&d.constructor==mxStackLayout&&!d.resizeLast){this.model.beginUpdate();try{for(var D=d.horizontal;null!=b&&null!=d&&d.constructor==mxStackLayout&&d.horizontal==D&&!d.resizeLast;){var p=this.getCellGeometry(b),E=this.view.getState(b);null!=E&&null!=p&&(p=p.clone(),d.horizontal?p.width+=g+Math.min(0,E.width/this.view.scale-p.width):p.height+=l+Math.min(0,E.height/this.view.scale-p.height),this.model.setGeometry(b,
+p));b=this.model.getParent(b);d=this.layoutManager.getLayout(b)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(b){var d=this.getCurrentCellStyle(b);return this.isSwimlane(b)?"0"!=d.container:"1"==d.container};Graph.prototype.isCellConnectable=function(b){var d=this.getCurrentCellStyle(b);return null!=d.connectable?"0"!=d.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
+Graph.prototype.isLabelMovable=function(b){var d=this.getCurrentCellStyle(b);return null!=d.movableLabel?"0"!=d.movableLabel:mxGraph.prototype.isLabelMovable.apply(this,arguments)};Graph.prototype.selectAll=function(b){b=b||this.getDefaultParent();this.isCellLocked(b)||mxGraph.prototype.selectAll.apply(this,arguments)};Graph.prototype.selectCells=function(b,d,g){g=g||this.getDefaultParent();this.isCellLocked(g)||mxGraph.prototype.selectCells.apply(this,arguments)};
+Graph.prototype.getSwimlaneAt=function(b,d,g){var l=mxGraph.prototype.getSwimlaneAt.apply(this,arguments);this.isCellLocked(l)&&(l=null);return l};Graph.prototype.isCellFoldable=function(b){var d=this.getCurrentCellStyle(b);return this.foldingEnabled&&"0"!=mxUtils.getValue(d,mxConstants.STYLE_RESIZABLE,"1")&&("1"==d.treeFolding||!this.isCellLocked(b)&&(this.isContainer(b)&&"0"!=d.collapsible||!this.isContainer(b)&&"1"==d.collapsible))};
+Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()};Graph.prototype.zoom=function(b,d){b=Math.max(.01,Math.min(this.view.scale*b,160))/this.view.scale;mxGraph.prototype.zoom.apply(this,arguments)};Graph.prototype.zoomIn=function(){.15>this.view.scale?this.zoom((this.view.scale+.01)/this.view.scale):this.zoom(Math.round(this.view.scale*this.zoomFactor*20)/20/this.view.scale)};
Graph.prototype.zoomOut=function(){.15>=this.view.scale?this.zoom((this.view.scale-.01)/this.view.scale):this.zoom(Math.round(1/this.zoomFactor*this.view.scale*20)/20/this.view.scale)};
-Graph.prototype.fitWindow=function(b,e){e=null!=e?e:10;var k=this.container.clientWidth-e,m=this.container.clientHeight-e,C=Math.floor(20*Math.min(k/b.width,m/b.height))/20;this.zoomTo(C);if(mxUtils.hasScrollbars(this.container)){var p=this.view.translate;this.container.scrollTop=(b.y+p.y)*C-Math.max((m-b.height*C)/2+e/2,0);this.container.scrollLeft=(b.x+p.x)*C-Math.max((k-b.width*C)/2+e/2,0)}};
-Graph.prototype.getTooltipForCell=function(b){var e="";if(mxUtils.isNode(b.value)){var k=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&(k=b.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==k&&(k=b.value.getAttribute("tooltip"));if(null!=k)null!=k&&this.isReplacePlaceholders(b)&&(k=this.replacePlaceholders(b,k)),e=this.sanitizeHtml(k);else{k=this.builtInProperties;b=b.value.attributes;var m=[];this.isEnabled()&&(k.push("linkTarget"),k.push("link"));for(var C=0;C<b.length;C++)(Graph.translateDiagram&&
-"label"==b[C].nodeName||0>mxUtils.indexOf(k,b[C].nodeName))&&0<b[C].nodeValue.length&&m.push({name:b[C].nodeName,value:b[C].nodeValue});m.sort(function(p,F){return p.name<F.name?-1:p.name>F.name?1:0});for(C=0;C<m.length;C++)"link"==m[C].name&&this.isCustomLink(m[C].value)||(e+=("link"!=m[C].name?"<b>"+mxUtils.htmlEntities(m[C].name)+":</b> ":"")+mxUtils.htmlEntities(m[C].value)+"\n");0<e.length&&(e=e.substring(0,e.length-1),mxClient.IS_SVG&&(e='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+
-e+"</div>"))}}return e};Graph.prototype.getFlowAnimationStyle=function(){var b=document.getElementsByTagName("head")[0];if(null!=b&&null==this.flowAnimationStyle){this.flowAnimationStyle=document.createElement("style");this.flowAnimationStyle.setAttribute("id","geEditorFlowAnimation-"+Editor.guid());this.flowAnimationStyle.type="text/css";var e=this.flowAnimationStyle.getAttribute("id");this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(e);b.appendChild(this.flowAnimationStyle)}return this.flowAnimationStyle};
-Graph.prototype.getFlowAnimationStyleCss=function(b){return"."+b+" {\nanimation: "+b+" 0.5s linear;\nanimation-iteration-count: infinite;\n}\n@keyframes "+b+" {\nto {\nstroke-dashoffset: "+-16*this.view.scale+";\n}\n}"};Graph.prototype.stringToBytes=function(b){return Graph.stringToBytes(b)};Graph.prototype.bytesToString=function(b){return Graph.bytesToString(b)};Graph.prototype.compressNode=function(b){return Graph.compressNode(b)};Graph.prototype.compress=function(b,e){return Graph.compress(b,e)};
-Graph.prototype.decompress=function(b,e){return Graph.decompress(b,e)};Graph.prototype.zapGremlins=function(b){return Graph.zapGremlins(b)};HoverIcons=function(b){mxEventSource.call(this);this.graph=b;this.init()};mxUtils.extend(HoverIcons,mxEventSource);HoverIcons.prototype.arrowSpacing=2;HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;
+Graph.prototype.fitWindow=function(b,d){d=null!=d?d:10;var g=this.container.clientWidth-d,l=this.container.clientHeight-d,D=Math.floor(20*Math.min(g/b.width,l/b.height))/20;this.zoomTo(D);if(mxUtils.hasScrollbars(this.container)){var p=this.view.translate;this.container.scrollTop=(b.y+p.y)*D-Math.max((l-b.height*D)/2+d/2,0);this.container.scrollLeft=(b.x+p.x)*D-Math.max((g-b.width*D)/2+d/2,0)}};
+Graph.prototype.getTooltipForCell=function(b){var d="";if(mxUtils.isNode(b.value)){var g=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&(g=b.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==g&&(g=b.value.getAttribute("tooltip"));if(null!=g)null!=g&&this.isReplacePlaceholders(b)&&(g=this.replacePlaceholders(b,g)),d=Graph.sanitizeHtml(g);else{g=this.builtInProperties;b=b.value.attributes;var l=[];this.isEnabled()&&(g.push("linkTarget"),g.push("link"));for(var D=0;D<b.length;D++)(Graph.translateDiagram&&
+"label"==b[D].nodeName||0>mxUtils.indexOf(g,b[D].nodeName))&&0<b[D].nodeValue.length&&l.push({name:b[D].nodeName,value:b[D].nodeValue});l.sort(function(p,E){return p.name<E.name?-1:p.name>E.name?1:0});for(D=0;D<l.length;D++)"link"==l[D].name&&this.isCustomLink(l[D].value)||(d+=("link"!=l[D].name?"<b>"+mxUtils.htmlEntities(l[D].name)+":</b> ":"")+mxUtils.htmlEntities(l[D].value)+"\n");0<d.length&&(d=d.substring(0,d.length-1),mxClient.IS_SVG&&(d='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+
+d+"</div>"))}}return d};Graph.prototype.getFlowAnimationStyle=function(){var b=document.getElementsByTagName("head")[0];if(null!=b&&null==this.flowAnimationStyle){this.flowAnimationStyle=document.createElement("style");this.flowAnimationStyle.setAttribute("id","geEditorFlowAnimation-"+Editor.guid());this.flowAnimationStyle.type="text/css";var d=this.flowAnimationStyle.getAttribute("id");this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(d);b.appendChild(this.flowAnimationStyle)}return this.flowAnimationStyle};
+Graph.prototype.getFlowAnimationStyleCss=function(b){return"."+b+" {\nanimation: "+b+" 0.5s linear;\nanimation-iteration-count: infinite;\n}\n@keyframes "+b+" {\nto {\nstroke-dashoffset: "+-16*this.view.scale+";\n}\n}"};Graph.prototype.stringToBytes=function(b){return Graph.stringToBytes(b)};Graph.prototype.bytesToString=function(b){return Graph.bytesToString(b)};Graph.prototype.compressNode=function(b){return Graph.compressNode(b)};Graph.prototype.compress=function(b,d){return Graph.compress(b,d)};
+Graph.prototype.decompress=function(b,d){return Graph.decompress(b,d)};Graph.prototype.zapGremlins=function(b){return Graph.zapGremlins(b)};HoverIcons=function(b){mxEventSource.call(this);this.graph=b;this.init()};mxUtils.extend(HoverIcons,mxEventSource);HoverIcons.prototype.arrowSpacing=2;HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;
HoverIcons.prototype.cssCursor="copy";HoverIcons.prototype.checkCollisions=!0;HoverIcons.prototype.arrowFill="#29b6f2";HoverIcons.prototype.triangleUp=mxClient.IS_SVG?Graph.createSvgImage(18,28,'<path d="m 6 26 L 12 26 L 12 12 L 18 12 L 9 1 L 1 12 L 6 12 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-up.png",26,14);
HoverIcons.prototype.triangleRight=mxClient.IS_SVG?Graph.createSvgImage(26,18,'<path d="m 1 6 L 14 6 L 14 1 L 26 9 L 14 18 L 14 12 L 1 12 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-right.png",14,26);HoverIcons.prototype.triangleDown=mxClient.IS_SVG?Graph.createSvgImage(18,26,'<path d="m 6 1 L 6 14 L 1 14 L 9 26 L 18 14 L 12 14 L 12 1 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-down.png",26,14);
HoverIcons.prototype.triangleLeft=mxClient.IS_SVG?Graph.createSvgImage(28,18,'<path d="m 1 9 L 12 1 L 12 6 L 26 6 L 26 12 L 12 12 L 12 18 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-left.png",14,26);HoverIcons.prototype.roundDrop=mxClient.IS_SVG?Graph.createSvgImage(26,26,'<circle cx="13" cy="13" r="12" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/round-drop.png",26,26);
@@ -2433,217 +2432,217 @@ HoverIcons.prototype.refreshTarget=new mxImage(mxClient.IS_SVG?"data:image/svg+x
IMAGE_PATH+"/refresh.png",38,38);HoverIcons.prototype.tolerance=mxClient.IS_TOUCH?6:0;
HoverIcons.prototype.init=function(){this.arrowUp=this.createArrow(this.triangleUp,mxResources.get("plusTooltip"),mxConstants.DIRECTION_NORTH);this.arrowRight=this.createArrow(this.triangleRight,mxResources.get("plusTooltip"),mxConstants.DIRECTION_EAST);this.arrowDown=this.createArrow(this.triangleDown,mxResources.get("plusTooltip"),mxConstants.DIRECTION_SOUTH);this.arrowLeft=this.createArrow(this.triangleLeft,mxResources.get("plusTooltip"),mxConstants.DIRECTION_WEST);this.elts=[this.arrowUp,this.arrowRight,
this.arrowDown,this.arrowLeft];this.resetHandler=mxUtils.bind(this,function(){this.reset()});this.repaintHandler=mxUtils.bind(this,function(){this.repaint()});this.graph.selectionModel.addListener(mxEvent.CHANGE,this.resetHandler);this.graph.model.addListener(mxEvent.CHANGE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE_AND_TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE,this.repaintHandler);
-this.graph.view.addListener(mxEvent.DOWN,this.repaintHandler);this.graph.view.addListener(mxEvent.UP,this.repaintHandler);this.graph.addListener(mxEvent.ROOT,this.repaintHandler);this.graph.addListener(mxEvent.ESCAPE,this.resetHandler);mxEvent.addListener(this.graph.container,"scroll",this.resetHandler);this.graph.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.mouseDownPoint=null}));mxEvent.addListener(this.graph.container,"mouseleave",mxUtils.bind(this,function(k){null!=k.relatedTarget&&
-mxEvent.getSource(k)==this.graph.container&&this.setDisplay("none")}));this.graph.addListener(mxEvent.START_EDITING,mxUtils.bind(this,function(k){this.reset()}));var b=this.graph.click;this.graph.click=mxUtils.bind(this,function(k){b.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)||!mxEvent.isTouchEvent(k.getEvent())||this.graph.model.isVertex(k.getCell())||this.reset()});var e=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(k,
-m){e=!1;k=m.getEvent();this.isResetEvent(k)?this.reset():this.isActive()||(m=this.getState(m.getState()),null==m&&mxEvent.isTouchEvent(k)||this.update(m));this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(k,m){k=m.getEvent();this.isResetEvent(k)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(k)||this.update(this.getState(m.getState()),m.getGraphX(),m.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(e=!0)}),mouseUp:mxUtils.bind(this,
-function(k,m){k=m.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(k),mxEvent.getClientY(k));this.isResetEvent(k)?this.reset():this.isActive()&&!e&&null!=this.mouseDownPoint?this.click(this.currentState,this.getDirection(),m):this.isActive()?1==this.graph.getSelectionCount()&&this.graph.model.isEdge(this.graph.getSelectionCell())?this.reset():this.update(this.getState(this.graph.view.getState(this.graph.getCellAt(m.getGraphX(),m.getGraphY())))):mxEvent.isTouchEvent(k)||null!=
-this.bbox&&mxUtils.contains(this.bbox,m.getGraphX(),m.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(k)||this.reset();e=!1;this.resetActiveArrow()})})};HoverIcons.prototype.isResetEvent=function(b,e){return mxEvent.isAltDown(b)||null==this.activeArrow&&mxEvent.isShiftDown(b)||mxEvent.isPopupTrigger(b)&&!this.graph.isCloneEvent(b)};
-HoverIcons.prototype.createArrow=function(b,e,k){var m=null;m=mxUtils.createImage(b.src);m.style.width=b.width+"px";m.style.height=b.height+"px";m.style.padding=this.tolerance+"px";null!=e&&m.setAttribute("title",e);m.style.position="absolute";m.style.cursor=this.cssCursor;mxEvent.addGestureListeners(m,mxUtils.bind(this,function(C){null==this.currentState||this.isResetEvent(C)||(this.mouseDownPoint=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(C),mxEvent.getClientY(C)),this.drag(C,
-this.mouseDownPoint.x,this.mouseDownPoint.y),this.activeArrow=m,this.setDisplay("none"),mxEvent.consume(C))}));mxEvent.redirectMouseEvents(m,this.graph,this.currentState);mxEvent.addListener(m,"mouseenter",mxUtils.bind(this,function(C){mxEvent.isMouseEvent(C)&&(null!=this.activeArrow&&this.activeArrow!=m&&mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.graph.connectionHandler.constraintHandler.reset(),mxUtils.setOpacity(m,100),this.activeArrow=m,this.fireEvent(new mxEventObject("focus",
-"arrow",m,"direction",k,"event",C)))}));mxEvent.addListener(m,"mouseleave",mxUtils.bind(this,function(C){mxEvent.isMouseEvent(C)&&this.fireEvent(new mxEventObject("blur","arrow",m,"direction",k,"event",C));this.graph.isMouseDown||this.resetActiveArrow()}));return m};HoverIcons.prototype.resetActiveArrow=function(){null!=this.activeArrow&&(mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.activeArrow=null)};
-HoverIcons.prototype.getDirection=function(){var b=mxConstants.DIRECTION_EAST;this.activeArrow==this.arrowUp?b=mxConstants.DIRECTION_NORTH:this.activeArrow==this.arrowDown?b=mxConstants.DIRECTION_SOUTH:this.activeArrow==this.arrowLeft&&(b=mxConstants.DIRECTION_WEST);return b};HoverIcons.prototype.visitNodes=function(b){for(var e=0;e<this.elts.length;e++)null!=this.elts[e]&&b(this.elts[e])};HoverIcons.prototype.removeNodes=function(){this.visitNodes(function(b){null!=b.parentNode&&b.parentNode.removeChild(b)})};
-HoverIcons.prototype.setDisplay=function(b){this.visitNodes(function(e){e.style.display=b})};HoverIcons.prototype.isActive=function(){return null!=this.activeArrow&&null!=this.currentState};
-HoverIcons.prototype.drag=function(b,e,k){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);null!=this.currentState&&(this.graph.connectionHandler.start(this.currentState,e,k),this.graph.isMouseTrigger=mxEvent.isMouseEvent(b),this.graph.isMouseDown=!0,e=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),null!=e&&e.setHandlesVisible(!1),e=this.graph.connectionHandler.edgeState,null!=b&&mxEvent.isShiftDown(b)&&mxEvent.isControlDown(b)&&null!=e&&"orthogonalEdgeStyle"===
-mxUtils.getValue(e.style,mxConstants.STYLE_EDGE,null)&&(b=this.getDirection(),e.cell.style=mxUtils.setStyle(e.cell.style,"sourcePortConstraint",b),e.style.sourcePortConstraint=b))};HoverIcons.prototype.getStateAt=function(b,e,k){return this.graph.view.getState(this.graph.getCellAt(e,k))};
-HoverIcons.prototype.click=function(b,e,k){var m=k.getEvent(),C=k.getGraphX(),p=k.getGraphY();C=this.getStateAt(b,C,p);null==C||!this.graph.model.isEdge(C.cell)||this.graph.isCloneEvent(m)||C.getVisibleTerminalState(!0)!=b&&C.getVisibleTerminalState(!1)!=b?null!=b&&this.execute(b,e,k):(this.graph.setSelectionCell(C.cell),this.reset());k.consume()};
-HoverIcons.prototype.execute=function(b,e,k){k=k.getEvent();this.graph.selectCellsForConnectVertex(this.graph.connectVertex(b.cell,e,this.graph.defaultEdgeLength,k,this.graph.isCloneEvent(k),this.graph.isCloneEvent(k)),k,this)};HoverIcons.prototype.reset=function(b){null!=b&&!b||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null;this.fireEvent(new mxEventObject("reset"))};
+this.graph.view.addListener(mxEvent.DOWN,this.repaintHandler);this.graph.view.addListener(mxEvent.UP,this.repaintHandler);this.graph.addListener(mxEvent.ROOT,this.repaintHandler);this.graph.addListener(mxEvent.ESCAPE,this.resetHandler);mxEvent.addListener(this.graph.container,"scroll",this.resetHandler);this.graph.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.mouseDownPoint=null}));mxEvent.addListener(this.graph.container,"mouseleave",mxUtils.bind(this,function(g){null!=g.relatedTarget&&
+mxEvent.getSource(g)==this.graph.container&&this.setDisplay("none")}));this.graph.addListener(mxEvent.START_EDITING,mxUtils.bind(this,function(g){this.reset()}));var b=this.graph.click;this.graph.click=mxUtils.bind(this,function(g){b.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)||!mxEvent.isTouchEvent(g.getEvent())||this.graph.model.isVertex(g.getCell())||this.reset()});var d=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(g,
+l){d=!1;g=l.getEvent();this.isResetEvent(g)?this.reset():this.isActive()||(l=this.getState(l.getState()),null==l&&mxEvent.isTouchEvent(g)||this.update(l));this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(g,l){g=l.getEvent();this.isResetEvent(g)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(g)||this.update(this.getState(l.getState()),l.getGraphX(),l.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(d=!0)}),mouseUp:mxUtils.bind(this,
+function(g,l){g=l.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(g),mxEvent.getClientY(g));this.isResetEvent(g)?this.reset():this.isActive()&&!d&&null!=this.mouseDownPoint?this.click(this.currentState,this.getDirection(),l):this.isActive()?1==this.graph.getSelectionCount()&&this.graph.model.isEdge(this.graph.getSelectionCell())?this.reset():this.update(this.getState(this.graph.view.getState(this.graph.getCellAt(l.getGraphX(),l.getGraphY())))):mxEvent.isTouchEvent(g)||null!=
+this.bbox&&mxUtils.contains(this.bbox,l.getGraphX(),l.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(g)||this.reset();d=!1;this.resetActiveArrow()})})};HoverIcons.prototype.isResetEvent=function(b,d){return mxEvent.isAltDown(b)||null==this.activeArrow&&mxEvent.isShiftDown(b)||mxEvent.isPopupTrigger(b)&&!this.graph.isCloneEvent(b)};
+HoverIcons.prototype.createArrow=function(b,d,g){var l=null;l=mxUtils.createImage(b.src);l.style.width=b.width+"px";l.style.height=b.height+"px";l.style.padding=this.tolerance+"px";null!=d&&l.setAttribute("title",d);l.style.position="absolute";l.style.cursor=this.cssCursor;mxEvent.addGestureListeners(l,mxUtils.bind(this,function(D){null==this.currentState||this.isResetEvent(D)||(this.mouseDownPoint=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(D),mxEvent.getClientY(D)),this.drag(D,
+this.mouseDownPoint.x,this.mouseDownPoint.y),this.activeArrow=l,this.setDisplay("none"),mxEvent.consume(D))}));mxEvent.redirectMouseEvents(l,this.graph,this.currentState);mxEvent.addListener(l,"mouseenter",mxUtils.bind(this,function(D){mxEvent.isMouseEvent(D)&&(null!=this.activeArrow&&this.activeArrow!=l&&mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.graph.connectionHandler.constraintHandler.reset(),mxUtils.setOpacity(l,100),this.activeArrow=l,this.fireEvent(new mxEventObject("focus",
+"arrow",l,"direction",g,"event",D)))}));mxEvent.addListener(l,"mouseleave",mxUtils.bind(this,function(D){mxEvent.isMouseEvent(D)&&this.fireEvent(new mxEventObject("blur","arrow",l,"direction",g,"event",D));this.graph.isMouseDown||this.resetActiveArrow()}));return l};HoverIcons.prototype.resetActiveArrow=function(){null!=this.activeArrow&&(mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.activeArrow=null)};
+HoverIcons.prototype.getDirection=function(){var b=mxConstants.DIRECTION_EAST;this.activeArrow==this.arrowUp?b=mxConstants.DIRECTION_NORTH:this.activeArrow==this.arrowDown?b=mxConstants.DIRECTION_SOUTH:this.activeArrow==this.arrowLeft&&(b=mxConstants.DIRECTION_WEST);return b};HoverIcons.prototype.visitNodes=function(b){for(var d=0;d<this.elts.length;d++)null!=this.elts[d]&&b(this.elts[d])};HoverIcons.prototype.removeNodes=function(){this.visitNodes(function(b){null!=b.parentNode&&b.parentNode.removeChild(b)})};
+HoverIcons.prototype.setDisplay=function(b){this.visitNodes(function(d){d.style.display=b})};HoverIcons.prototype.isActive=function(){return null!=this.activeArrow&&null!=this.currentState};
+HoverIcons.prototype.drag=function(b,d,g){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);null!=this.currentState&&(this.graph.connectionHandler.start(this.currentState,d,g),this.graph.isMouseTrigger=mxEvent.isMouseEvent(b),this.graph.isMouseDown=!0,d=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),null!=d&&d.setHandlesVisible(!1),d=this.graph.connectionHandler.edgeState,null!=b&&mxEvent.isShiftDown(b)&&mxEvent.isControlDown(b)&&null!=d&&"orthogonalEdgeStyle"===
+mxUtils.getValue(d.style,mxConstants.STYLE_EDGE,null)&&(b=this.getDirection(),d.cell.style=mxUtils.setStyle(d.cell.style,"sourcePortConstraint",b),d.style.sourcePortConstraint=b))};HoverIcons.prototype.getStateAt=function(b,d,g){return this.graph.view.getState(this.graph.getCellAt(d,g))};
+HoverIcons.prototype.click=function(b,d,g){var l=g.getEvent(),D=g.getGraphX(),p=g.getGraphY();D=this.getStateAt(b,D,p);null==D||!this.graph.model.isEdge(D.cell)||this.graph.isCloneEvent(l)||D.getVisibleTerminalState(!0)!=b&&D.getVisibleTerminalState(!1)!=b?null!=b&&this.execute(b,d,g):(this.graph.setSelectionCell(D.cell),this.reset());g.consume()};
+HoverIcons.prototype.execute=function(b,d,g){g=g.getEvent();this.graph.selectCellsForConnectVertex(this.graph.connectVertex(b.cell,d,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 k=null;null!=e&&(b.x-=e.horizontalOffset/2,b.y-=e.verticalOffset/2,b.width+=e.horizontalOffset,b.height+=e.verticalOffset,null!=e.rotationShape&&null!=e.rotationShape.node&&"hidden"!=e.rotationShape.node.style.visibility&&"none"!=e.rotationShape.node.style.display&&null!=e.rotationShape.boundingBox&&
-(k=e.rotationShape.boundingBox));e=mxUtils.bind(this,function(L,P,d){if(null!=k){var f=new mxRectangle(P,d,L.clientWidth,L.clientHeight);mxUtils.intersects(f,k)&&(L==this.arrowUp?d-=f.y+f.height-k.y:L==this.arrowRight?P+=k.x+k.width-f.x:L==this.arrowDown?d+=k.y+k.height-f.y:L==this.arrowLeft&&(P-=f.x+f.width-k.x))}L.style.left=P+"px";L.style.top=d+"px";mxUtils.setOpacity(L,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()),C=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2);b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=e&&e==m&&m==C&&C==b&&(b=C=m=e=null);var p=this.graph.getCellGeometry(this.currentState.cell),F=mxUtils.bind(this,function(L,P){var d=this.graph.model.isVertex(L)&&this.graph.getCellGeometry(L);null==L||this.graph.model.isAncestor(L,
-this.currentState.cell)||this.graph.isSwimlane(L)||!(null==d||null==p||d.height<3*p.height&&d.width<3*p.width)?P.style.visibility="visible":P.style.visibility="hidden"});F(e,this.arrowRight);F(m,this.arrowLeft);F(C,this.arrowUp);F(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 d=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);this.graph.isTableRow(this.currentState.cell)&&(d=this.graph.selectionCellsHandler.getHandler(this.graph.model.getParent(this.currentState.cell)));var g=null;null!=d&&(b.x-=d.horizontalOffset/2,b.y-=d.verticalOffset/2,b.width+=d.horizontalOffset,b.height+=d.verticalOffset,null!=d.rotationShape&&null!=d.rotationShape.node&&"hidden"!=d.rotationShape.node.style.visibility&&"none"!=d.rotationShape.node.style.display&&null!=d.rotationShape.boundingBox&&
+(g=d.rotationShape.boundingBox));d=mxUtils.bind(this,function(N,R,G){if(null!=g){var M=new mxRectangle(R,G,N.clientWidth,N.clientHeight);mxUtils.intersects(M,g)&&(N==this.arrowUp?G-=M.y+M.height-g.y:N==this.arrowRight?R+=g.x+g.width-M.x:N==this.arrowDown?G+=g.y+g.height-M.y:N==this.arrowLeft&&(R-=M.x+M.width-g.x))}N.style.left=R+"px";N.style.top=G+"px";mxUtils.setOpacity(N,this.inactiveOpacity)});d(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-
+this.triangleUp.height-this.tolerance));d(this.arrowRight,Math.round(b.x+b.width-this.tolerance),Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance));d(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(b.y+b.height-this.tolerance));d(this.arrowLeft,Math.round(b.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){d=this.graph.getCellAt(b.x+b.width+this.triangleRight.width/2,this.currentState.getCenterY());
+var l=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),D=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2);b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=d&&d==l&&l==D&&D==b&&(b=D=l=d=null);var p=this.graph.getCellGeometry(this.currentState.cell),E=mxUtils.bind(this,function(N,R){var G=this.graph.model.isVertex(N)&&this.graph.getCellGeometry(N);null==N||this.graph.model.isAncestor(N,
+this.currentState.cell)||this.graph.isSwimlane(N)||!(null==G||null==p||G.height<3*p.height&&G.width<3*p.width)?R.style.visibility="visible":R.style.visibility="hidden"});E(d,this.arrowRight);E(l,this.arrowLeft);E(D,this.arrowUp);E(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
this.arrowRight.setAttribute("title",mxResources.get("plusTooltip")),this.arrowUp.setAttribute("title",mxResources.get("plusTooltip")),this.arrowDown.setAttribute("title",mxResources.get("plusTooltip"))):(this.arrowLeft.removeAttribute("title"),this.arrowRight.removeAttribute("title"),this.arrowUp.removeAttribute("title"),this.arrowDown.removeAttribute("title"))}else this.reset();null!=this.currentState&&(this.bbox=this.computeBoundingBox(),null!=this.bbox&&this.bbox.grow(10))}};
-HoverIcons.prototype.computeBoundingBox=function(){var b=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(e){null!=e.parentNode&&(e=new mxRectangle(e.offsetLeft,e.offsetTop,e.offsetWidth,e.offsetHeight),null==b?b=e:b.add(e))});return b};
-HoverIcons.prototype.getState=function(b){if(null!=b)if(b=b.cell,this.graph.getModel().contains(b)){if(this.graph.getModel().isVertex(b)&&!this.graph.isCellConnectable(b)){var e=this.graph.getModel().getParent(b);this.graph.getModel().isVertex(e)&&this.graph.isCellConnectable(e)&&(b=e)}if(this.graph.isCellLocked(b)||this.graph.model.isEdge(b))b=null;b=this.graph.view.getState(b);null!=b&&null==b.style&&(b=null)}else b=null;return b};
-HoverIcons.prototype.update=function(b,e,k){if(!this.graph.connectionArrowsEnabled||null!=this.graph.freehand&&this.graph.freehand.isDrawing()||null!=b&&"0"==mxUtils.getValue(b.style,"allowArrows","1"))this.reset();else{null!=b&&null!=b.cell.geometry&&b.cell.geometry.relative&&this.graph.model.isEdge(b.cell.parent)&&(b=null);var m=null;this.prev!=b||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=b,m=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=b&&(this.updateThread=
-window.setTimeout(mxUtils.bind(this,function(){this.isActive()||this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=b,this.update(b,e,k))}),this.updateDelay+10))):null!=this.startTime&&(m=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=b&&m<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,e,k)?this.reset(!1):(null!=this.currentState||m>this.activationDelay)&&this.currentState!=b&&(m>this.updateDelay&&null!=
-b||null==this.bbox||null==e||null==k||!mxUtils.contains(this.bbox,e,k))&&(null!=b&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(b),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=b&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}};
-HoverIcons.prototype.setCurrentState=function(b){"eastwest"!=b.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=b};Graph.prototype.createParent=function(b,e,k,m,C){b=this.cloneCell(b);for(var p=0;p<k;p++){var F=this.cloneCell(e),L=this.getCellGeometry(F);null!=L&&(L.x+=p*m,L.y+=p*C);b.insert(F)}return b};
-Graph.prototype.createTable=function(b,e,k,m,C,p,F,L,P){k=null!=k?k:60;m=null!=m?m:40;p=null!=p?p:30;L=null!=L?L:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";P=null!=P?P:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,
-null,null!=C?C:"",0,0,e*k,b*m+(null!=C?p:0),null!=F?F:"shape=table;startSize="+(null!=C?p:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,e*k,m,L),this.createVertex(null,null,"",0,0,k,m,P),e,k,0),b,0,m)};
-Graph.prototype.setTableValues=function(b,e,k){for(var m=this.model.getChildCells(b,!0),C=0;C<m.length;C++)if(null!=k&&(m[C].value=k[C]),null!=e)for(var p=this.model.getChildCells(m[C],!0),F=0;F<p.length;F++)null!=e[C][F]&&(p[F].value=e[C][F]);return b};
-Graph.prototype.createCrossFunctionalSwimlane=function(b,e,k,m,C,p,F,L,P){k=null!=k?k:120;m=null!=m?m:120;F=null!=F?F:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";L=null!=L?L:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";
-P=null!=P?P:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";C=this.createVertex(null,null,null!=C?C:"",0,0,e*k,b*m,null!=p?p:"shape=table;childLayout=tableLayout;"+(null==C?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");p=mxUtils.getValue(this.getCellStyle(C),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);C.geometry.width+=p;C.geometry.height+=p;F=this.createVertex(null,
-null,"",0,p,e*k+p,m,F);C.insert(this.createParent(F,this.createVertex(null,null,"",p,0,k,m,L),e,k,0));return 1<b?(F.geometry.y=m+p,this.createParent(C,this.createParent(F,this.createVertex(null,null,"",p,0,k,m,P),e,k,0),b-1,0,m)):C};
-Graph.prototype.visitTableCells=function(b,e){var k=null,m=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var C=0;C<m.length;C++){for(var p=this.getActualStartSize(m[C],!0),F=this.model.getChildCells(m[C],!0),L=this.getCellStyle(m[C],!0),P=null,d=[],f=0;f<F.length;f++){var g=this.getCellGeometry(F[f]),x={cell:F[f],rospan:1,colspan:1,row:C,col:f,geo:g};g=null!=g.alternateBounds?g.alternateBounds:g;x.point=new mxPoint(g.width+(null!=P?P.point.x:b.x+p.x),g.height+(null!=k&&null!=
-k[0]?k[0].point.y:b.y+p.y));x.actual=x;null!=k&&null!=k[f]&&1<k[f].rowspan?(x.rowspan=k[f].rowspan-1,x.colspan=k[f].colspan,x.actual=k[f].actual):null!=P&&1<P.colspan?(x.rowspan=P.rowspan,x.colspan=P.colspan-1,x.actual=P.actual):(P=this.getCurrentCellStyle(F[f],!0),null!=P&&(x.rowspan=parseInt(P.rowspan||1),x.colspan=parseInt(P.colspan||1)));P=1==mxUtils.getValue(L,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(L,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;e(x,F.length,
-m.length,b.x+(P?p.x:0),b.y+(P?p.y:0));d.push(x);P=x}k=d}};Graph.prototype.getTableLines=function(b,e,k){var m=[],C=[];(e||k)&&this.visitTableCells(b,mxUtils.bind(this,function(p,F,L,P,d){e&&p.row<L-1&&(null==m[p.row]&&(m[p.row]=[new mxPoint(P,p.point.y)]),1<p.rowspan&&m[p.row].push(null),m[p.row].push(p.point));k&&p.col<F-1&&(null==C[p.col]&&(C[p.col]=[new mxPoint(p.point.x,d)]),1<p.colspan&&C[p.col].push(null),C[p.col].push(p.point))}));return m.concat(C)};
+HoverIcons.prototype.computeBoundingBox=function(){var b=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(d){null!=d.parentNode&&(d=new mxRectangle(d.offsetLeft,d.offsetTop,d.offsetWidth,d.offsetHeight),null==b?b=d:b.add(d))});return b};
+HoverIcons.prototype.getState=function(b){if(null!=b)if(b=b.cell,this.graph.getModel().contains(b)){if(this.graph.getModel().isVertex(b)&&!this.graph.isCellConnectable(b)){var d=this.graph.getModel().getParent(b);this.graph.getModel().isVertex(d)&&this.graph.isCellConnectable(d)&&(b=d)}if(this.graph.isCellLocked(b)||this.graph.model.isEdge(b))b=null;b=this.graph.view.getState(b);null!=b&&null==b.style&&(b=null)}else b=null;return b};
+HoverIcons.prototype.update=function(b,d,g){if(!this.graph.connectionArrowsEnabled||null!=this.graph.freehand&&this.graph.freehand.isDrawing()||null!=b&&"0"==mxUtils.getValue(b.style,"allowArrows","1"))this.reset();else{null!=b&&null!=b.cell.geometry&&b.cell.geometry.relative&&this.graph.model.isEdge(b.cell.parent)&&(b=null);var l=null;this.prev!=b||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=b,l=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=b&&(this.updateThread=
+window.setTimeout(mxUtils.bind(this,function(){this.isActive()||this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=b,this.update(b,d,g))}),this.updateDelay+10))):null!=this.startTime&&(l=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=b&&l<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,d,g)?this.reset(!1):(null!=this.currentState||l>this.activationDelay)&&this.currentState!=b&&(l>this.updateDelay&&null!=
+b||null==this.bbox||null==d||null==g||!mxUtils.contains(this.bbox,d,g))&&(null!=b&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(b),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=b&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}};
+HoverIcons.prototype.setCurrentState=function(b){"eastwest"!=b.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=b};Graph.prototype.createParent=function(b,d,g,l,D){b=this.cloneCell(b);for(var p=0;p<g;p++){var E=this.cloneCell(d),N=this.getCellGeometry(E);null!=N&&(N.x+=p*l,N.y+=p*D);b.insert(E)}return b};
+Graph.prototype.createTable=function(b,d,g,l,D,p,E,N,R){g=null!=g?g:60;l=null!=l?l:40;p=null!=p?p:30;N=null!=N?N:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";R=null!=R?R:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,
+null,null!=D?D:"",0,0,d*g,b*l+(null!=D?p:0),null!=E?E:"shape=table;startSize="+(null!=D?p:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,d*g,l,N),this.createVertex(null,null,"",0,0,g,l,R),d,g,0),b,0,l)};
+Graph.prototype.setTableValues=function(b,d,g){for(var l=this.model.getChildCells(b,!0),D=0;D<l.length;D++)if(null!=g&&(l[D].value=g[D]),null!=d)for(var p=this.model.getChildCells(l[D],!0),E=0;E<p.length;E++)null!=d[D][E]&&(p[E].value=d[D][E]);return b};
+Graph.prototype.createCrossFunctionalSwimlane=function(b,d,g,l,D,p,E,N,R){g=null!=g?g:120;l=null!=l?l:120;E=null!=E?E:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";N=null!=N?N:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";
+R=null!=R?R:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";D=this.createVertex(null,null,null!=D?D:"",0,0,d*g,b*l,null!=p?p:"shape=table;childLayout=tableLayout;"+(null==D?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");p=mxUtils.getValue(this.getCellStyle(D),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);D.geometry.width+=p;D.geometry.height+=p;E=this.createVertex(null,
+null,"",0,p,d*g+p,l,E);D.insert(this.createParent(E,this.createVertex(null,null,"",p,0,g,l,N),d,g,0));return 1<b?(E.geometry.y=l+p,this.createParent(D,this.createParent(E,this.createVertex(null,null,"",p,0,g,l,R),d,g,0),b-1,0,l)):D};
+Graph.prototype.visitTableCells=function(b,d){var g=null,l=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var D=0;D<l.length;D++){for(var p=this.getActualStartSize(l[D],!0),E=this.model.getChildCells(l[D],!0),N=this.getCellStyle(l[D],!0),R=null,G=[],M=0;M<E.length;M++){var Q=this.getCellGeometry(E[M]),e={cell:E[M],rospan:1,colspan:1,row:D,col:M,geo:Q};Q=null!=Q.alternateBounds?Q.alternateBounds:Q;e.point=new mxPoint(Q.width+(null!=R?R.point.x:b.x+p.x),Q.height+(null!=g&&null!=
+g[0]?g[0].point.y:b.y+p.y));e.actual=e;null!=g&&null!=g[M]&&1<g[M].rowspan?(e.rowspan=g[M].rowspan-1,e.colspan=g[M].colspan,e.actual=g[M].actual):null!=R&&1<R.colspan?(e.rowspan=R.rowspan,e.colspan=R.colspan-1,e.actual=R.actual):(R=this.getCurrentCellStyle(E[M],!0),null!=R&&(e.rowspan=parseInt(R.rowspan||1),e.colspan=parseInt(R.colspan||1)));R=1==mxUtils.getValue(N,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(N,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;d(e,E.length,
+l.length,b.x+(R?p.x:0),b.y+(R?p.y:0));G.push(e);R=e}g=G}};Graph.prototype.getTableLines=function(b,d,g){var l=[],D=[];(d||g)&&this.visitTableCells(b,mxUtils.bind(this,function(p,E,N,R,G){d&&p.row<N-1&&(null==l[p.row]&&(l[p.row]=[new mxPoint(R,p.point.y)]),1<p.rowspan&&l[p.row].push(null),l[p.row].push(p.point));g&&p.col<E-1&&(null==D[p.col]&&(D[p.col]=[new mxPoint(p.point.x,G)]),1<p.colspan&&D[p.col].push(null),D[p.col].push(p.point))}));return l.concat(D)};
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,k){k=null!=k?k:!0;var m=this.getModel();m.beginUpdate();try{var C=this.getCellGeometry(b);if(null!=C){C=C.clone();C.height+=e;m.setGeometry(b,C);var p=m.getParent(b),F=m.getChildCells(p,!0);if(!k){var L=mxUtils.indexOf(F,b);if(L<F.length-1){var P=F[L+1],d=this.getCellGeometry(P);null!=d&&(d=d.clone(),d.y+=e,d.height-=e,m.setGeometry(P,d))}}var f=this.getCellGeometry(p);null!=f&&(k||(k=b==F[F.length-1]),k&&(f=f.clone(),f.height+=e,m.setGeometry(p,f)))}}finally{m.endUpdate()}};
-Graph.prototype.setTableColumnWidth=function(b,e,k){k=null!=k?k:!1;var m=this.getModel(),C=m.getParent(b),p=m.getParent(C),F=m.getChildCells(C,!0);b=mxUtils.indexOf(F,b);var L=b==F.length-1;m.beginUpdate();try{for(var P=m.getChildCells(p,!0),d=0;d<P.length;d++){C=P[d];F=m.getChildCells(C,!0);var f=F[b],g=this.getCellGeometry(f);null!=g&&(g=g.clone(),g.width+=e,null!=g.alternateBounds&&(g.alternateBounds.width+=e),m.setGeometry(f,g));b<F.length-1&&(f=F[b+1],g=this.getCellGeometry(f),null!=g&&(g=g.clone(),
-g.x+=e,k||(g.width-=e,null!=g.alternateBounds&&(g.alternateBounds.width-=e)),m.setGeometry(f,g)))}if(L||k){var x=this.getCellGeometry(p);null!=x&&(x=x.clone(),x.width+=e,m.setGeometry(p,x))}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 k=0,m=0;m<b.length;m++)if(!this.isVertexIgnored(b[m])){var C=this.graph.getCellGeometry(b[m]);null!=C&&(k+=e?C.width:C.height)}return k};
-TableLayout.prototype.getRowLayout=function(b,e){var k=this.graph.model.getChildCells(b,!0),m=this.graph.getActualStartSize(b,!0);b=this.getSize(k,!0);e=e-m.x-m.width;var C=[];m=m.x;for(var p=0;p<k.length;p++){var F=this.graph.getCellGeometry(k[p]);null!=F&&(m+=(null!=F.alternateBounds?F.alternateBounds.width:F.width)*e/b,C.push(Math.round(m)))}return C};
-TableLayout.prototype.layoutRow=function(b,e,k,m){var C=this.graph.getModel(),p=C.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var F=b.x,L=0;null!=e&&(e=e.slice(),e.splice(0,0,b.x));for(var P=0;P<p.length;P++){var d=this.graph.getCellGeometry(p[P]);null!=d&&(d=d.clone(),d.y=b.y,d.height=k-b.y-b.height,null!=e?(d.x=e[P],d.width=e[P+1]-d.x,P==p.length-1&&P<e.length-2&&(d.width=m-d.x-b.x-b.width)):(d.x=F,F+=d.width,P==p.length-1?d.width=m-b.x-b.width-L:L+=d.width),d.alternateBounds=new mxRectangle(0,
-0,d.width,d.height),C.setGeometry(p[P],d))}return L};
-TableLayout.prototype.execute=function(b){if(null!=b){var e=this.graph.getActualStartSize(b,!0),k=this.graph.getCellGeometry(b),m=this.graph.getCellStyle(b),C="1"==mxUtils.getValue(m,"resizeLastRow","0"),p="1"==mxUtils.getValue(m,"resizeLast","0");m="1"==mxUtils.getValue(m,"fixedRows","0");var F=this.graph.getModel(),L=0;F.beginUpdate();try{for(var P=k.height-e.y-e.height,d=k.width-e.x-e.width,f=F.getChildCells(b,!0),g=0;g<f.length;g++)F.setVisible(f[g],!0);var x=this.getSize(f,!1);if(0<P&&0<d&&0<
-f.length&&0<x){if(C){var y=this.graph.getCellGeometry(f[f.length-1]);null!=y&&(y=y.clone(),y.height=P-x+y.height,F.setGeometry(f[f.length-1],y))}var t=p?null:this.getRowLayout(f[0],d),G=[],D=e.y;for(g=0;g<f.length;g++)y=this.graph.getCellGeometry(f[g]),null!=y&&(y=y.clone(),y.x=e.x,y.width=d,y.y=Math.round(D),D=C||m?D+y.height:D+y.height/x*P,y.height=Math.round(D)-y.y,F.setGeometry(f[g],y)),L=Math.max(L,this.layoutRow(f[g],t,y.height,d,G));m&&P<x&&(k=k.clone(),k.height=D+e.height,F.setGeometry(b,
-k));p&&d<L+Graph.minTableColumnWidth&&(k=k.clone(),k.width=L+e.width+e.x+Graph.minTableColumnWidth,F.setGeometry(b,k));this.graph.visitTableCells(b,mxUtils.bind(this,function(I){F.setVisible(I.cell,I.actual.cell==I.cell);if(I.actual.cell!=I.cell){if(I.actual.row==I.row){var H=null!=I.geo.alternateBounds?I.geo.alternateBounds:I.geo;I.actual.geo.width+=H.width}I.actual.col==I.col&&(H=null!=I.geo.alternateBounds?I.geo.alternateBounds:I.geo,I.actual.geo.height+=H.height)}}))}else for(g=0;g<f.length;g++)F.setVisible(f[g],
-!1)}finally{F.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(f,g){g=null!=g?g:!0;var x=this.getState(f);null!=x&&g&&this.graph.model.isEdge(x.cell)&&null!=x.style&&1!=x.style[mxConstants.STYLE_CURVED]&&!x.invalid&&this.updateLineJumps(x)&&this.graph.cellRenderer.redraw(x,!1,this.isRendering());x=e.apply(this,
-arguments);null!=x&&g&&this.graph.model.isEdge(x.cell)&&null!=x.style&&1!=x.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(x);return x};var k=mxShape.prototype.paint;mxShape.prototype.paint=function(){k.apply(this,arguments);if(null!=this.state&&null!=this.node&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")){var f=this.node.getElementsByTagName("path");if(1<f.length){"1"!=mxUtils.getValue(this.state.style,
-mxConstants.STYLE_DASHED,"0")&&f[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var g=this.state.view.graph.getFlowAnimationStyle();null!=g&&f[1].setAttribute("class",g.getAttribute("id"))}}};var m=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(f,g){return m.apply(this,arguments)||null!=f.routedPoints&&null!=g.routedPoints&&!mxUtils.equalPoints(g.routedPoints,f.routedPoints)};var C=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
-function(f){C.apply(this,arguments);this.graph.model.isEdge(f.cell)&&1!=f.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(f)};mxGraphView.prototype.updateLineJumps=function(f){var g=f.absolutePoints;if(Graph.lineJumpsEnabled){var x=null!=f.routedPoints,y=null;if(null!=g&&null!=this.validEdges&&"none"!==mxUtils.getValue(f.style,"jumpStyle","none")){var t=function(oa,na,N){var aa=new mxPoint(na,N);aa.type=oa;y.push(aa);aa=null!=f.routedPoints?f.routedPoints[y.length-1]:null;return null==aa||aa.type!=
-oa||aa.x!=na||aa.y!=N},G=.5*this.scale;x=!1;y=[];for(var D=0;D<g.length-1;D++){for(var I=g[D+1],H=g[D],S=[],T=g[D+2];D<g.length-2&&mxUtils.ptSegDistSq(H.x,H.y,T.x,T.y,I.x,I.y)<1*this.scale*this.scale;)I=T,D++,T=g[D+2];x=t(0,H.x,H.y)||x;for(var M=0;M<this.validEdges.length;M++){var fa=this.validEdges[M],la=fa.absolutePoints;if(null!=la&&mxUtils.intersects(f,fa)&&"1"!=fa.style.noJump)for(fa=0;fa<la.length-1;fa++){var ra=la[fa+1],ba=la[fa];for(T=la[fa+2];fa<la.length-2&&mxUtils.ptSegDistSq(ba.x,ba.y,
-T.x,T.y,ra.x,ra.y)<1*this.scale*this.scale;)ra=T,fa++,T=la[fa+2];T=mxUtils.intersection(H.x,H.y,I.x,I.y,ba.x,ba.y,ra.x,ra.y);if(null!=T&&(Math.abs(T.x-H.x)>G||Math.abs(T.y-H.y)>G)&&(Math.abs(T.x-I.x)>G||Math.abs(T.y-I.y)>G)&&(Math.abs(T.x-ba.x)>G||Math.abs(T.y-ba.y)>G)&&(Math.abs(T.x-ra.x)>G||Math.abs(T.y-ra.y)>G)){ra=T.x-H.x;ba=T.y-H.y;T={distSq:ra*ra+ba*ba,x:T.x,y:T.y};for(ra=0;ra<S.length;ra++)if(S[ra].distSq>T.distSq){S.splice(ra,0,T);T=null;break}null==T||0!=S.length&&S[S.length-1].x===T.x&&
-S[S.length-1].y===T.y||S.push(T)}}}for(fa=0;fa<S.length;fa++)x=t(1,S[fa].x,S[fa].y)||x}T=g[g.length-1];x=t(0,T.x,T.y)||x}f.routedPoints=y;return x}return!1};var p=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(f,g,x){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)p.apply(this,arguments);else{var y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
-mxConstants.LINE_ARCSIZE)/2,t=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,G=mxUtils.getValue(this.style,"jumpStyle","none"),D=!0,I=null,H=null,S=[],T=null;f.begin();for(var M=0;M<this.state.routedPoints.length;M++){var fa=this.state.routedPoints[M],la=new mxPoint(fa.x/this.scale,fa.y/this.scale);0==M?la=g[0]:M==this.state.routedPoints.length-1&&(la=g[g.length-1]);var ra=!1;if(null!=I&&1==fa.type){var ba=this.state.routedPoints[M+1];fa=ba.x/this.scale-
-la.x;ba=ba.y/this.scale-la.y;fa=fa*fa+ba*ba;null==T&&(T=new mxPoint(la.x-I.x,la.y-I.y),H=Math.sqrt(T.x*T.x+T.y*T.y),0<H?(T.x=T.x*t/H,T.y=T.y*t/H):T=null);fa>t*t&&0<H&&(fa=I.x-la.x,ba=I.y-la.y,fa=fa*fa+ba*ba,fa>t*t&&(ra=new mxPoint(la.x-T.x,la.y-T.y),fa=new mxPoint(la.x+T.x,la.y+T.y),S.push(ra),this.addPoints(f,S,x,y,!1,null,D),S=0>Math.round(T.x)||0==Math.round(T.x)&&0>=Math.round(T.y)?1:-1,D=!1,"sharp"==G?(f.lineTo(ra.x-T.y*S,ra.y+T.x*S),f.lineTo(fa.x-T.y*S,fa.y+T.x*S),f.lineTo(fa.x,fa.y)):"line"==
-G?(f.moveTo(ra.x+T.y*S,ra.y-T.x*S),f.lineTo(ra.x-T.y*S,ra.y+T.x*S),f.moveTo(fa.x-T.y*S,fa.y+T.x*S),f.lineTo(fa.x+T.y*S,fa.y-T.x*S),f.moveTo(fa.x,fa.y)):"arc"==G?(S*=1.3,f.curveTo(ra.x-T.y*S,ra.y+T.x*S,fa.x-T.y*S,fa.y+T.x*S,fa.x,fa.y)):(f.moveTo(fa.x,fa.y),D=!0),S=[fa],ra=!0))}else T=null;ra||(S.push(la),I=la)}this.addPoints(f,S,x,y,!1,null,D);f.stroke()}};var F=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(f,g,x,y){return null!=g&&"centerPerimeter"==
-g.style[mxConstants.STYLE_PERIMETER]?new mxPoint(g.getCenterX(),g.getCenterY()):F.apply(this,arguments)};var L=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(f,g,x,y){if(null==g||null==f||"1"!=g.style.snapToPoint&&"1"!=f.style.snapToPoint)L.apply(this,arguments);else{g=this.getTerminalPort(f,g,y);var t=this.getNextPoint(f,x,y),G=this.graph.isOrthogonal(f),D=mxUtils.toRadians(Number(g.style[mxConstants.STYLE_ROTATION]||"0")),I=new mxPoint(g.getCenterX(),
-g.getCenterY());if(0!=D){var H=Math.cos(-D),S=Math.sin(-D);t=mxUtils.getRotatedPoint(t,H,S,I)}H=parseFloat(f.style[mxConstants.STYLE_PERIMETER_SPACING]||0);H+=parseFloat(f.style[y?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);t=this.getPerimeterPoint(g,t,0==D&&G,H);0!=D&&(H=Math.cos(D),S=Math.sin(D),t=mxUtils.getRotatedPoint(t,H,S,I));f.setAbsoluteTerminalPoint(this.snapToAnchorPoint(f,g,x,y,t),y)}};mxGraphView.prototype.snapToAnchorPoint=function(f,g,
-x,y,t){if(null!=g&&null!=f){f=this.graph.getAllConnectionConstraints(g);y=x=null;if(null!=f)for(var G=0;G<f.length;G++){var D=this.graph.getConnectionPoint(g,f[G]);if(null!=D){var I=(D.x-t.x)*(D.x-t.x)+(D.y-t.y)*(D.y-t.y);if(null==y||I<y)x=D,y=I}}null!=x&&(t=x)}return t};var P=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(f,g,x){var y=P.apply(this,arguments);"1"==f.getAttribute("placeholders")&&null!=x.state&&(y=x.state.view.graph.replacePlaceholders(x.state.cell,
-y));return y};var d=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(f){if(null!=f.style&&"undefined"!==typeof pako){var g=mxUtils.getValue(f.style,mxConstants.STYLE_SHAPE,null);if(null!=g&&"string"===typeof g&&"stencil("==g.substring(0,8))try{var x=g.substring(8,g.length-1),y=mxUtils.parseXml(Graph.decompress(x));return new mxShape(new mxStencil(y.documentElement))}catch(t){null!=window.console&&console.log("Error in shape: "+t)}}return d.apply(this,arguments)}})();
+Graph.prototype.setTableRowHeight=function(b,d,g){g=null!=g?g:!0;var l=this.getModel();l.beginUpdate();try{var D=this.getCellGeometry(b);if(null!=D){D=D.clone();D.height+=d;l.setGeometry(b,D);var p=l.getParent(b),E=l.getChildCells(p,!0);if(!g){var N=mxUtils.indexOf(E,b);if(N<E.length-1){var R=E[N+1],G=this.getCellGeometry(R);null!=G&&(G=G.clone(),G.y+=d,G.height-=d,l.setGeometry(R,G))}}var M=this.getCellGeometry(p);null!=M&&(g||(g=b==E[E.length-1]),g&&(M=M.clone(),M.height+=d,l.setGeometry(p,M)))}}finally{l.endUpdate()}};
+Graph.prototype.setTableColumnWidth=function(b,d,g){g=null!=g?g:!1;var l=this.getModel(),D=l.getParent(b),p=l.getParent(D),E=l.getChildCells(D,!0);b=mxUtils.indexOf(E,b);var N=b==E.length-1;l.beginUpdate();try{for(var R=l.getChildCells(p,!0),G=0;G<R.length;G++){D=R[G];E=l.getChildCells(D,!0);var M=E[b],Q=this.getCellGeometry(M);null!=Q&&(Q=Q.clone(),Q.width+=d,null!=Q.alternateBounds&&(Q.alternateBounds.width+=d),l.setGeometry(M,Q));b<E.length-1&&(M=E[b+1],Q=this.getCellGeometry(M),null!=Q&&(Q=Q.clone(),
+Q.x+=d,g||(Q.width-=d,null!=Q.alternateBounds&&(Q.alternateBounds.width-=d)),l.setGeometry(M,Q)))}if(N||g){var e=this.getCellGeometry(p);null!=e&&(e=e.clone(),e.width+=d,l.setGeometry(p,e))}null!=this.layoutManager&&this.layoutManager.executeLayout(p)}finally{l.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
+TableLayout.prototype.isVertexIgnored=function(b){return!this.graph.getModel().isVertex(b)||!this.graph.isCellVisible(b)};TableLayout.prototype.getSize=function(b,d){for(var g=0,l=0;l<b.length;l++)if(!this.isVertexIgnored(b[l])){var D=this.graph.getCellGeometry(b[l]);null!=D&&(g+=d?D.width:D.height)}return g};
+TableLayout.prototype.getRowLayout=function(b,d){var g=this.graph.model.getChildCells(b,!0),l=this.graph.getActualStartSize(b,!0);b=this.getSize(g,!0);d=d-l.x-l.width;var D=[];l=l.x;for(var p=0;p<g.length;p++){var E=this.graph.getCellGeometry(g[p]);null!=E&&(l+=(null!=E.alternateBounds?E.alternateBounds.width:E.width)*d/b,D.push(Math.round(l)))}return D};
+TableLayout.prototype.layoutRow=function(b,d,g,l){var D=this.graph.getModel(),p=D.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var E=b.x,N=0;null!=d&&(d=d.slice(),d.splice(0,0,b.x));for(var R=0;R<p.length;R++){var G=this.graph.getCellGeometry(p[R]);null!=G&&(G=G.clone(),G.y=b.y,G.height=g-b.y-b.height,null!=d?(G.x=d[R],G.width=d[R+1]-G.x,R==p.length-1&&R<d.length-2&&(G.width=l-G.x-b.x-b.width)):(G.x=E,E+=G.width,R==p.length-1?G.width=l-b.x-b.width-N:N+=G.width),G.alternateBounds=new mxRectangle(0,
+0,G.width,G.height),D.setGeometry(p[R],G))}return N};
+TableLayout.prototype.execute=function(b){if(null!=b){var d=this.graph.getActualStartSize(b,!0),g=this.graph.getCellGeometry(b),l=this.graph.getCellStyle(b),D="1"==mxUtils.getValue(l,"resizeLastRow","0"),p="1"==mxUtils.getValue(l,"resizeLast","0");l="1"==mxUtils.getValue(l,"fixedRows","0");var E=this.graph.getModel(),N=0;E.beginUpdate();try{for(var R=g.height-d.y-d.height,G=g.width-d.x-d.width,M=E.getChildCells(b,!0),Q=0;Q<M.length;Q++)E.setVisible(M[Q],!0);var e=this.getSize(M,!1);if(0<R&&0<G&&0<
+M.length&&0<e){if(D){var f=this.graph.getCellGeometry(M[M.length-1]);null!=f&&(f=f.clone(),f.height=R-e+f.height,E.setGeometry(M[M.length-1],f))}var k=p?null:this.getRowLayout(M[0],G),z=[],t=d.y;for(Q=0;Q<M.length;Q++)f=this.graph.getCellGeometry(M[Q]),null!=f&&(f=f.clone(),f.x=d.x,f.width=G,f.y=Math.round(t),t=D||l?t+f.height:t+f.height/e*R,f.height=Math.round(t)-f.y,E.setGeometry(M[Q],f)),N=Math.max(N,this.layoutRow(M[Q],k,f.height,G,z));l&&R<e&&(g=g.clone(),g.height=t+d.height,E.setGeometry(b,
+g));p&&G<N+Graph.minTableColumnWidth&&(g=g.clone(),g.width=N+d.width+d.x+Graph.minTableColumnWidth,E.setGeometry(b,g));this.graph.visitTableCells(b,mxUtils.bind(this,function(B){E.setVisible(B.cell,B.actual.cell==B.cell);if(B.actual.cell!=B.cell){if(B.actual.row==B.row){var I=null!=B.geo.alternateBounds?B.geo.alternateBounds:B.geo;B.actual.geo.width+=I.width}B.actual.col==B.col&&(I=null!=B.geo.alternateBounds?B.geo.alternateBounds:B.geo,B.actual.geo.height+=I.height)}}))}else for(Q=0;Q<M.length;Q++)E.setVisible(M[Q],
+!1)}finally{E.endUpdate()}}};
+(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var d=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(M,Q){Q=null!=Q?Q:!0;var e=this.getState(M);null!=e&&Q&&this.graph.model.isEdge(e.cell)&&null!=e.style&&1!=e.style[mxConstants.STYLE_CURVED]&&!e.invalid&&this.updateLineJumps(e)&&this.graph.cellRenderer.redraw(e,!1,this.isRendering());e=d.apply(this,
+arguments);null!=e&&Q&&this.graph.model.isEdge(e.cell)&&null!=e.style&&1!=e.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(e);return e};var g=mxShape.prototype.paint;mxShape.prototype.paint=function(){g.apply(this,arguments);if(null!=this.state&&null!=this.node&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")){var M=this.node.getElementsByTagName("path");if(1<M.length){"1"!=mxUtils.getValue(this.state.style,
+mxConstants.STYLE_DASHED,"0")&&M[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var Q=this.state.view.graph.getFlowAnimationStyle();null!=Q&&M[1].setAttribute("class",Q.getAttribute("id"))}}};var l=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(M,Q){return l.apply(this,arguments)||null!=M.routedPoints&&null!=Q.routedPoints&&!mxUtils.equalPoints(Q.routedPoints,M.routedPoints)};var D=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
+function(M){D.apply(this,arguments);this.graph.model.isEdge(M.cell)&&1!=M.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(M)};mxGraphView.prototype.updateLineJumps=function(M){var Q=M.absolutePoints;if(Graph.lineJumpsEnabled){var e=null!=M.routedPoints,f=null;if(null!=Q&&null!=this.validEdges&&"none"!==mxUtils.getValue(M.style,"jumpStyle","none")){var k=function(qa,sa,L){var V=new mxPoint(sa,L);V.type=qa;f.push(V);V=null!=M.routedPoints?M.routedPoints[f.length-1]:null;return null==V||V.type!=
+qa||V.x!=sa||V.y!=L},z=.5*this.scale;e=!1;f=[];for(var t=0;t<Q.length-1;t++){for(var B=Q[t+1],I=Q[t],O=[],J=Q[t+2];t<Q.length-2&&mxUtils.ptSegDistSq(I.x,I.y,J.x,J.y,B.x,B.y)<1*this.scale*this.scale;)B=J,t++,J=Q[t+2];e=k(0,I.x,I.y)||e;for(var y=0;y<this.validEdges.length;y++){var ia=this.validEdges[y],da=ia.absolutePoints;if(null!=da&&mxUtils.intersects(M,ia)&&"1"!=ia.style.noJump)for(ia=0;ia<da.length-1;ia++){var ja=da[ia+1],aa=da[ia];for(J=da[ia+2];ia<da.length-2&&mxUtils.ptSegDistSq(aa.x,aa.y,J.x,
+J.y,ja.x,ja.y)<1*this.scale*this.scale;)ja=J,ia++,J=da[ia+2];J=mxUtils.intersection(I.x,I.y,B.x,B.y,aa.x,aa.y,ja.x,ja.y);if(null!=J&&(Math.abs(J.x-I.x)>z||Math.abs(J.y-I.y)>z)&&(Math.abs(J.x-B.x)>z||Math.abs(J.y-B.y)>z)&&(Math.abs(J.x-aa.x)>z||Math.abs(J.y-aa.y)>z)&&(Math.abs(J.x-ja.x)>z||Math.abs(J.y-ja.y)>z)){ja=J.x-I.x;aa=J.y-I.y;J={distSq:ja*ja+aa*aa,x:J.x,y:J.y};for(ja=0;ja<O.length;ja++)if(O[ja].distSq>J.distSq){O.splice(ja,0,J);J=null;break}null==J||0!=O.length&&O[O.length-1].x===J.x&&O[O.length-
+1].y===J.y||O.push(J)}}}for(ia=0;ia<O.length;ia++)e=k(1,O[ia].x,O[ia].y)||e}J=Q[Q.length-1];e=k(0,J.x,J.y)||e}M.routedPoints=f;return e}return!1};var p=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(M,Q,e){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)p.apply(this,arguments);else{var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
+mxConstants.LINE_ARCSIZE)/2,k=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,z=mxUtils.getValue(this.style,"jumpStyle","none"),t=!0,B=null,I=null,O=[],J=null;M.begin();for(var y=0;y<this.state.routedPoints.length;y++){var ia=this.state.routedPoints[y],da=new mxPoint(ia.x/this.scale,ia.y/this.scale);0==y?da=Q[0]:y==this.state.routedPoints.length-1&&(da=Q[Q.length-1]);var ja=!1;if(null!=B&&1==ia.type){var aa=this.state.routedPoints[y+1];ia=aa.x/this.scale-
+da.x;aa=aa.y/this.scale-da.y;ia=ia*ia+aa*aa;null==J&&(J=new mxPoint(da.x-B.x,da.y-B.y),I=Math.sqrt(J.x*J.x+J.y*J.y),0<I?(J.x=J.x*k/I,J.y=J.y*k/I):J=null);ia>k*k&&0<I&&(ia=B.x-da.x,aa=B.y-da.y,ia=ia*ia+aa*aa,ia>k*k&&(ja=new mxPoint(da.x-J.x,da.y-J.y),ia=new mxPoint(da.x+J.x,da.y+J.y),O.push(ja),this.addPoints(M,O,e,f,!1,null,t),O=0>Math.round(J.x)||0==Math.round(J.x)&&0>=Math.round(J.y)?1:-1,t=!1,"sharp"==z?(M.lineTo(ja.x-J.y*O,ja.y+J.x*O),M.lineTo(ia.x-J.y*O,ia.y+J.x*O),M.lineTo(ia.x,ia.y)):"line"==
+z?(M.moveTo(ja.x+J.y*O,ja.y-J.x*O),M.lineTo(ja.x-J.y*O,ja.y+J.x*O),M.moveTo(ia.x-J.y*O,ia.y+J.x*O),M.lineTo(ia.x+J.y*O,ia.y-J.x*O),M.moveTo(ia.x,ia.y)):"arc"==z?(O*=1.3,M.curveTo(ja.x-J.y*O,ja.y+J.x*O,ia.x-J.y*O,ia.y+J.x*O,ia.x,ia.y)):(M.moveTo(ia.x,ia.y),t=!0),O=[ia],ja=!0))}else J=null;ja||(O.push(da),B=da)}this.addPoints(M,O,e,f,!1,null,t);M.stroke()}};var E=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(M,Q,e,f){return null!=Q&&"centerPerimeter"==
+Q.style[mxConstants.STYLE_PERIMETER]?new mxPoint(Q.getCenterX(),Q.getCenterY()):E.apply(this,arguments)};var N=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(M,Q,e,f){if(null==Q||null==M||"1"!=Q.style.snapToPoint&&"1"!=M.style.snapToPoint)N.apply(this,arguments);else{Q=this.getTerminalPort(M,Q,f);var k=this.getNextPoint(M,e,f),z=this.graph.isOrthogonal(M),t=mxUtils.toRadians(Number(Q.style[mxConstants.STYLE_ROTATION]||"0")),B=new mxPoint(Q.getCenterX(),
+Q.getCenterY());if(0!=t){var I=Math.cos(-t),O=Math.sin(-t);k=mxUtils.getRotatedPoint(k,I,O,B)}I=parseFloat(M.style[mxConstants.STYLE_PERIMETER_SPACING]||0);I+=parseFloat(M.style[f?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);k=this.getPerimeterPoint(Q,k,0==t&&z,I);0!=t&&(I=Math.cos(t),O=Math.sin(t),k=mxUtils.getRotatedPoint(k,I,O,B));M.setAbsoluteTerminalPoint(this.snapToAnchorPoint(M,Q,e,f,k),f)}};mxGraphView.prototype.snapToAnchorPoint=function(M,Q,
+e,f,k){if(null!=Q&&null!=M){M=this.graph.getAllConnectionConstraints(Q);f=e=null;if(null!=M)for(var z=0;z<M.length;z++){var t=this.graph.getConnectionPoint(Q,M[z]);if(null!=t){var B=(t.x-k.x)*(t.x-k.x)+(t.y-k.y)*(t.y-k.y);if(null==f||B<f)e=t,f=B}}null!=e&&(k=e)}return k};var R=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(M,Q,e){var f=R.apply(this,arguments);"1"==M.getAttribute("placeholders")&&null!=e.state&&(f=e.state.view.graph.replacePlaceholders(e.state.cell,
+f));return f};var G=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(M){if(null!=M.style&&"undefined"!==typeof pako){var Q=mxUtils.getValue(M.style,mxConstants.STYLE_SHAPE,null);if(null!=Q&&"string"===typeof Q&&"stencil("==Q.substring(0,8))try{var e=Q.substring(8,Q.length-1),f=mxUtils.parseXml(Graph.decompress(e));return new mxShape(new mxStencil(f.documentElement))}catch(k){null!=window.console&&console.log("Error in shape: "+k)}}return G.apply(this,arguments)}})();
mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};
-mxStencilRegistry.getStencil=function(b){var e=mxStencilRegistry.stencils[b];if(null==e&&null==mxCellRenderer.defaultShapes[b]&&mxStencilRegistry.dynamicLoading){var k=mxStencilRegistry.getBasenameForStencil(b);if(null!=k){e=mxStencilRegistry.libraries[k];if(null!=e){if(null==mxStencilRegistry.packages[k]){for(var m=0;m<e.length;m++){var C=e[m];if(!mxStencilRegistry.filesLoaded[C])if(mxStencilRegistry.filesLoaded[C]=!0,".xml"==C.toLowerCase().substring(C.length-4,C.length))mxStencilRegistry.loadStencilSet(C,
-null);else if(".js"==C.toLowerCase().substring(C.length-3,C.length))try{if(mxStencilRegistry.allowEval){var p=mxUtils.load(C);null!=p&&200<=p.getStatus()&&299>=p.getStatus()&&eval.call(window,p.getText())}}catch(F){null!=window.console&&console.log("error in getStencil:",b,k,e,C,F)}}mxStencilRegistry.packages[k]=1}}else k=k.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+k+".xml",null);e=mxStencilRegistry.stencils[b]}}return e};
-mxStencilRegistry.getBasenameForStencil=function(b){var e=null;if(null!=b&&"string"===typeof b&&(b=b.split("."),0<b.length&&"mxgraph"==b[0])){e=b[1];for(var k=2;k<b.length-1;k++)e+="/"+b[k]}return e};
-mxStencilRegistry.loadStencilSet=function(b,e,k,m){var C=mxStencilRegistry.packages[b];if(null!=k&&k||null==C){var p=!1;if(null==C)try{if(m){mxStencilRegistry.loadStencil(b,mxUtils.bind(this,function(F){null!=F&&null!=F.documentElement&&(mxStencilRegistry.packages[b]=F,p=!0,mxStencilRegistry.parseStencilSet(F.documentElement,e,p))}));return}C=mxStencilRegistry.loadStencil(b);mxStencilRegistry.packages[b]=C;p=!0}catch(F){null!=window.console&&console.log("error in loadStencilSet:",b,F)}null!=C&&null!=
-C.documentElement&&mxStencilRegistry.parseStencilSet(C.documentElement,e,p)}};mxStencilRegistry.loadStencil=function(b,e){if(null!=e)mxUtils.get(b,mxUtils.bind(this,function(k){e(200<=k.getStatus()&&299>=k.getStatus()?k.getXml():null)}));else return mxUtils.load(b).getXml()};mxStencilRegistry.parseStencilSets=function(b){for(var e=0;e<b.length;e++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(b[e]).documentElement)};
-mxStencilRegistry.parseStencilSet=function(b,e,k){if("stencils"==b.nodeName)for(var m=b.firstChild;null!=m;)"shapes"==m.nodeName&&mxStencilRegistry.parseStencilSet(m,e,k),m=m.nextSibling;else{k=null!=k?k:!0;m=b.firstChild;var C="";b=b.getAttribute("name");for(null!=b&&(C=b+".");null!=m;){if(m.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=m.getAttribute("name"),null!=b)){C=C.toLowerCase();var p=b.replace(/ /g,"_");k&&mxStencilRegistry.addStencil(C+p.toLowerCase(),new mxStencil(m));if(null!=e){var F=m.getAttribute("w"),
-L=m.getAttribute("h");F=null==F?80:parseInt(F,10);L=null==L?80:parseInt(L,10);e(C,p,b,F,L)}}m=m.nextSibling}}};
-"undefined"!==typeof mxVertexHandler&&function(){function b(){var z=document.createElement("div");z.className="geHint";z.style.whiteSpace="nowrap";z.style.position="absolute";return z}function e(z,J){switch(J){case mxConstants.POINTS:return z;case mxConstants.MILLIMETERS:return(z/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(z/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(z/mxConstants.PIXELS_PER_INCH).toFixed(2)}}mxConstants.HANDLE_FILLCOLOR="#29b6f2";
+mxStencilRegistry.getStencil=function(b){var d=mxStencilRegistry.stencils[b];if(null==d&&null==mxCellRenderer.defaultShapes[b]&&mxStencilRegistry.dynamicLoading){var g=mxStencilRegistry.getBasenameForStencil(b);if(null!=g){d=mxStencilRegistry.libraries[g];if(null!=d){if(null==mxStencilRegistry.packages[g]){for(var l=0;l<d.length;l++){var D=d[l];if(!mxStencilRegistry.filesLoaded[D])if(mxStencilRegistry.filesLoaded[D]=!0,".xml"==D.toLowerCase().substring(D.length-4,D.length))mxStencilRegistry.loadStencilSet(D,
+null);else if(".js"==D.toLowerCase().substring(D.length-3,D.length))try{if(mxStencilRegistry.allowEval){var p=mxUtils.load(D);null!=p&&200<=p.getStatus()&&299>=p.getStatus()&&eval.call(window,p.getText())}}catch(E){null!=window.console&&console.log("error in getStencil:",b,g,d,D,E)}}mxStencilRegistry.packages[g]=1}}else g=g.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+g+".xml",null);d=mxStencilRegistry.stencils[b]}}return d};
+mxStencilRegistry.getBasenameForStencil=function(b){var d=null;if(null!=b&&"string"===typeof b&&(b=b.split("."),0<b.length&&"mxgraph"==b[0])){d=b[1];for(var g=2;g<b.length-1;g++)d+="/"+b[g]}return d};
+mxStencilRegistry.loadStencilSet=function(b,d,g,l){var D=mxStencilRegistry.packages[b];if(null!=g&&g||null==D){var p=!1;if(null==D)try{if(l){mxStencilRegistry.loadStencil(b,mxUtils.bind(this,function(E){null!=E&&null!=E.documentElement&&(mxStencilRegistry.packages[b]=E,p=!0,mxStencilRegistry.parseStencilSet(E.documentElement,d,p))}));return}D=mxStencilRegistry.loadStencil(b);mxStencilRegistry.packages[b]=D;p=!0}catch(E){null!=window.console&&console.log("error in loadStencilSet:",b,E)}null!=D&&null!=
+D.documentElement&&mxStencilRegistry.parseStencilSet(D.documentElement,d,p)}};mxStencilRegistry.loadStencil=function(b,d){if(null!=d)mxUtils.get(b,mxUtils.bind(this,function(g){d(200<=g.getStatus()&&299>=g.getStatus()?g.getXml():null)}));else return mxUtils.load(b).getXml()};mxStencilRegistry.parseStencilSets=function(b){for(var d=0;d<b.length;d++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(b[d]).documentElement)};
+mxStencilRegistry.parseStencilSet=function(b,d,g){if("stencils"==b.nodeName)for(var l=b.firstChild;null!=l;)"shapes"==l.nodeName&&mxStencilRegistry.parseStencilSet(l,d,g),l=l.nextSibling;else{g=null!=g?g:!0;l=b.firstChild;var D="";b=b.getAttribute("name");for(null!=b&&(D=b+".");null!=l;){if(l.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=l.getAttribute("name"),null!=b)){D=D.toLowerCase();var p=b.replace(/ /g,"_");g&&mxStencilRegistry.addStencil(D+p.toLowerCase(),new mxStencil(l));if(null!=d){var E=l.getAttribute("w"),
+N=l.getAttribute("h");E=null==E?80:parseInt(E,10);N=null==N?80:parseInt(N,10);d(D,p,b,E,N)}}l=l.nextSibling}}};
+"undefined"!==typeof mxVertexHandler&&function(){function b(){var x=document.createElement("div");x.className="geHint";x.style.whiteSpace="nowrap";x.style.position="absolute";return x}function d(x,H){switch(H){case mxConstants.POINTS:return x;case mxConstants.MILLIMETERS:return(x/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(x/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(x/mxConstants.PIXELS_PER_INCH).toFixed(2)}}mxConstants.HANDLE_FILLCOLOR="#29b6f2";
mxConstants.HANDLE_STROKECOLOR="#0088cf";mxConstants.VERTEX_SELECTION_COLOR="#00a8ff";mxConstants.OUTLINE_COLOR="#00a8ff";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#99ccff";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#00a8ff";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.EDGE_SELECTION_COLOR="#00a8ff";mxConstants.DEFAULT_VALID_COLOR="#00a8ff";mxConstants.LABEL_HANDLE_FILLCOLOR="#cee7ff";mxConstants.GUIDE_COLOR="#0088cf";mxConstants.HIGHLIGHT_OPACITY=30;mxConstants.HIGHLIGHT_SIZE=5;mxEdgeHandler.prototype.snapToTerminals=
-!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(z){return!mxEvent.isAltDown(z)};var k=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(z){return k.apply(this,arguments)||this.graph.isTableRow(z)||this.graph.isTableCell(z)};var m=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(z){return m.apply(this,arguments)||
-this.graph.isEdgeIgnored(z)};var C=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(z){return this.graph.isCloneEvent(z)!=C.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var z=new mxEllipse(null,this.highlightColor,this.highlightColor,0);z.opacity=mxConstants.HIGHLIGHT_OPACITY;return z};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor="crosshair";mxConnectionHandler.prototype.createEdgeState=
-function(z){z=this.graph.createCurrentEdgeStyle();z=this.graph.createEdge(null,null,null,null,null,z);z=new mxCellState(this.graph.view,z,this.graph.getCellStyle(z));for(var J in this.graph.currentEdgeStyle)z.style[J]=this.graph.currentEdgeStyle[J];z.style=this.graph.postProcessCellStyle(z.cell,z.style);return z};var p=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var z=p.apply(this,arguments);z.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];
-return z};mxConnectionHandler.prototype.updatePreview=function(z){};var F=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var z=F.apply(this,arguments),J=z.getCell;z.getCell=mxUtils.bind(this,function(O){var U=J.apply(this,arguments);this.error=null;return U});return z};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=
-function(){for(var z="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",J="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),O=0;O<J.length;O++)null!=this.currentEdgeStyle[J[O]]&&(z+=J[O]+"="+this.currentEdgeStyle[J[O]]+";");null!=this.currentEdgeStyle.orthogonalLoop?z+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&
-(z+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?z+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(z+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(z+="elbow="+this.currentEdgeStyle.elbow+";");return z=null!=this.currentEdgeStyle.html?z+("html="+this.currentEdgeStyle.html+";"):z+"html=1;"};
-Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var z=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=z&&(new mxCodec(z.ownerDocument)).decode(z,this.getStylesheet())};Graph.prototype.createCellLookup=function(z,J){J=null!=J?J:{};for(var O=0;O<z.length;O++){var U=z[O];J[mxObjectIdentity.get(U)]=U.getId();for(var W=this.model.getChildCount(U),
-ea=0;ea<W;ea++)this.createCellLookup([this.model.getChildAt(U,ea)],J)}return J};Graph.prototype.createCellMapping=function(z,J,O){O=null!=O?O:{};for(var U in z){var W=J[U];null==O[W]&&(O[W]=z[U].getId()||"")}return O};Graph.prototype.importGraphModel=function(z,J,O,U){J=null!=J?J:0;O=null!=O?O:0;var W=new mxCodec(z.ownerDocument),ea=new mxGraphModel;W.decode(z,ea);z=[];W={};var ka={},xa=ea.getChildren(this.cloneCell(ea.root,this.isCloneInvalidEdges(),W));if(null!=xa){var ta=this.createCellLookup([ea.root]);
-xa=xa.slice();this.model.beginUpdate();try{if(1!=xa.length||this.isCellLocked(this.getDefaultParent()))for(ea=0;ea<xa.length;ea++)pa=this.model.getChildren(this.moveCells([xa[ea]],J,O,!1,this.model.getRoot())[0]),null!=pa&&(z=z.concat(pa));else{var pa=ea.getChildren(xa[0]);null!=pa&&(z=this.moveCells(pa,J,O,!1,this.getDefaultParent()),ka[ea.getChildAt(ea.root,0).getId()]=this.getDefaultParent().getId())}if(null!=z&&(this.createCellMapping(W,ta,ka),this.updateCustomLinks(ka,z),U)){this.isGridEnabled()&&
-(J=this.snap(J),O=this.snap(O));var ua=this.getBoundingBoxFromGeometry(z,!0);null!=ua&&this.moveCells(z,J-ua.x,O-ua.y)}}finally{this.model.endUpdate()}}return z};Graph.prototype.encodeCells=function(z){for(var J={},O=this.cloneCells(z,null,J),U=new mxDictionary,W=0;W<z.length;W++)U.put(z[W],!0);var ea=new mxCodec,ka=new mxGraphModel,xa=ka.getChildAt(ka.getRoot(),0);for(W=0;W<O.length;W++){ka.add(xa,O[W]);var ta=this.view.getState(z[W]);if(null!=ta){var pa=this.getCellGeometry(O[W]);null!=pa&&pa.relative&&
-!this.model.isEdge(z[W])&&null==U.get(this.model.getParent(z[W]))&&(pa.offset=null,pa.relative=!1,pa.x=ta.x/ta.view.scale-ta.view.translate.x,pa.y=ta.y/ta.view.scale-ta.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(J,this.createCellLookup(z)),O);return ea.encode(ka)};Graph.prototype.isSwimlane=function(z,J){var O=null;null==z||this.model.isEdge(z)||this.model.getParent(z)==this.model.getRoot()||(O=this.getCurrentCellStyle(z,J)[mxConstants.STYLE_SHAPE]);return O==mxConstants.SHAPE_SWIMLANE||
-"table"==O||"tableRow"==O};var L=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(z){var J=this.model.getParent(z);if(null!=J){var O=this.getCurrentCellStyle(J);if(null!=O.expand)return"0"!=O.expand}return L.apply(this,arguments)&&(null==J||!this.isTable(J))};var P=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(z,J,O,U,W,ea,ka,xa){null==xa&&(xa=this.model.getParent(z),this.isTable(xa)||this.isTableRow(xa))&&(xa=this.getCellAt(ea,ka,null,!0,!1));O=null;this.model.beginUpdate();
-try{O=P.apply(this,[z,J,O,U,W,ea,ka,xa]);this.model.setValue(O,"");var ta=this.getChildCells(O,!0);for(J=0;J<ta.length;J++){var pa=this.getCellGeometry(ta[J]);null!=pa&&pa.relative&&0<pa.x&&this.model.remove(ta[J])}var ua=this.getChildCells(z,!0);for(J=0;J<ua.length;J++)pa=this.getCellGeometry(ua[J]),null!=pa&&pa.relative&&0>=pa.x&&this.model.remove(ua[J]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[O]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[O]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
-null,[z]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[z]);var Da=this.model.getTerminal(O,!1);if(null!=Da){var Fa=this.getCurrentCellStyle(Da);null!=Fa&&"1"==Fa.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[z]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[z]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[O]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[O]))}}finally{this.model.endUpdate()}return O};var d=Graph.prototype.selectCell;Graph.prototype.selectCell=
-function(z,J,O){if(J||O)d.apply(this,arguments);else{var U=this.getSelectionCell(),W=null,ea=[],ka=mxUtils.bind(this,function(xa){if(null!=this.view.getState(xa)&&(this.model.isVertex(xa)||this.model.isEdge(xa)))if(ea.push(xa),xa==U)W=ea.length-1;else if(z&&null==U&&0<ea.length||null!=W&&z&&ea.length>W||!z&&0<W)return;for(var ta=0;ta<this.model.getChildCount(xa);ta++)ka(this.model.getChildAt(xa,ta))});ka(this.model.root);0<ea.length&&(W=null!=W?mxUtils.mod(W+(z?1:-1),ea.length):0,this.setSelectionCell(ea[W]))}};
-Graph.prototype.swapShapes=function(z,J,O,U,W,ea,ka){J=!1;if(!U&&null!=W&&1==z.length&&(U=this.view.getState(W),O=this.view.getState(z[0]),null!=U&&null!=O&&(null!=ea&&mxEvent.isShiftDown(ea)||"umlLifeline"==U.style.shape&&"umlLifeline"==O.style.shape)&&(U=this.getCellGeometry(W),ea=this.getCellGeometry(z[0]),null!=U&&null!=ea))){J=U.clone();U=ea.clone();U.x=J.x;U.y=J.y;J.x=ea.x;J.y=ea.y;this.model.beginUpdate();try{this.model.setGeometry(W,J),this.model.setGeometry(z[0],U)}finally{this.model.endUpdate()}J=
-!0}return J};var f=Graph.prototype.moveCells;Graph.prototype.moveCells=function(z,J,O,U,W,ea,ka){if(this.swapShapes(z,J,O,U,W,ea,ka))return z;ka=null!=ka?ka:{};if(this.isTable(W)){for(var xa=[],ta=0;ta<z.length;ta++)this.isTable(z[ta])?xa=xa.concat(this.model.getChildCells(z[ta],!0).reverse()):xa.push(z[ta]);z=xa}this.model.beginUpdate();try{xa=[];for(ta=0;ta<z.length;ta++)if(null!=W&&this.isTableRow(z[ta])){var pa=this.model.getParent(z[ta]),ua=this.getCellGeometry(z[ta]);this.isTable(pa)&&xa.push(pa);
-if(null!=pa&&null!=ua&&this.isTable(pa)&&this.isTable(W)&&(U||pa!=W)){if(!U){var Da=this.getCellGeometry(pa);null!=Da&&(Da=Da.clone(),Da.height-=ua.height,this.model.setGeometry(pa,Da))}Da=this.getCellGeometry(W);null!=Da&&(Da=Da.clone(),Da.height+=ua.height,this.model.setGeometry(W,Da));var Fa=this.model.getChildCells(W,!0);if(0<Fa.length){z[ta]=U?this.cloneCell(z[ta]):z[ta];var Ma=this.model.getChildCells(z[ta],!0),Qa=this.model.getChildCells(Fa[0],!0),Ba=Qa.length-Ma.length;if(0<Ba)for(var Ka=
-0;Ka<Ba;Ka++){var Oa=this.cloneCell(Ma[Ma.length-1]);null!=Oa&&(Oa.value="",this.model.add(z[ta],Oa))}else if(0>Ba)for(Ka=0;Ka>Ba;Ka--)this.model.remove(Ma[Ma.length+Ka-1]);Ma=this.model.getChildCells(z[ta],!0);for(Ka=0;Ka<Qa.length;Ka++){var Ya=this.getCellGeometry(Qa[Ka]),db=this.getCellGeometry(Ma[Ka]);null!=Ya&&null!=db&&(db=db.clone(),db.width=Ya.width,this.model.setGeometry(Ma[Ka],db))}}}}var eb=f.apply(this,arguments);for(ta=0;ta<xa.length;ta++)!U&&this.model.contains(xa[ta])&&0==this.model.getChildCount(xa[ta])&&
-this.model.remove(xa[ta]);U&&this.updateCustomLinks(this.createCellMapping(ka,this.createCellLookup(z)),eb)}finally{this.model.endUpdate()}return eb};var g=Graph.prototype.removeCells;Graph.prototype.removeCells=function(z,J){var O=[];this.model.beginUpdate();try{for(var U=0;U<z.length;U++)if(this.isTableCell(z[U])){var W=this.model.getParent(z[U]),ea=this.model.getParent(W);1==this.model.getChildCount(W)&&1==this.model.getChildCount(ea)?0>mxUtils.indexOf(z,ea)&&0>mxUtils.indexOf(O,ea)&&O.push(ea):
-this.labelChanged(z[U],"")}else{if(this.isTableRow(z[U])&&(ea=this.model.getParent(z[U]),0>mxUtils.indexOf(z,ea)&&0>mxUtils.indexOf(O,ea))){for(var ka=this.model.getChildCells(ea,!0),xa=0,ta=0;ta<ka.length;ta++)0<=mxUtils.indexOf(z,ka[ta])&&xa++;xa==ka.length&&O.push(ea)}O.push(z[U])}O=g.apply(this,[O,J])}finally{this.model.endUpdate()}return O};Graph.prototype.updateCustomLinks=function(z,J,O){O=null!=O?O:new Graph;for(var U=0;U<J.length;U++)null!=J[U]&&O.updateCustomLinksForCell(z,J[U],O)};Graph.prototype.updateCustomLinksForCell=
-function(z,J){this.doUpdateCustomLinksForCell(z,J);for(var O=this.model.getChildCount(J),U=0;U<O;U++)this.updateCustomLinksForCell(z,this.model.getChildAt(J,U))};Graph.prototype.doUpdateCustomLinksForCell=function(z,J){};Graph.prototype.getAllConnectionConstraints=function(z,J){if(null!=z){J=mxUtils.getValue(z.style,"points",null);if(null!=J){z=[];try{var O=JSON.parse(J);for(J=0;J<O.length;J++){var U=O[J];z.push(new mxConnectionConstraint(new mxPoint(U[0],U[1]),2<U.length?"0"!=U[2]:!0,null,3<U.length?
-U[3]:0,4<U.length?U[4]:0))}}catch(ea){}return z}if(null!=z.shape&&null!=z.shape.bounds){U=z.shape.direction;J=z.shape.bounds;var W=z.shape.scale;O=J.width/W;J=J.height/W;if(U==mxConstants.DIRECTION_NORTH||U==mxConstants.DIRECTION_SOUTH)U=O,O=J,J=U;J=z.shape.getConstraints(z.style,O,J);if(null!=J)return J;if(null!=z.shape.stencil&&null!=z.shape.stencil.constraints)return z.shape.stencil.constraints;if(null!=z.shape.constraints)return z.shape.constraints}}return null};Graph.prototype.flipEdge=function(z){if(null!=
-z){var J=this.getCurrentCellStyle(z);J=mxUtils.getValue(J,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,J,[z])}};Graph.prototype.isValidRoot=function(z){for(var J=this.model.getChildCount(z),O=0,U=0;U<J;U++){var W=this.model.getChildAt(z,U);this.model.isVertex(W)&&(W=this.getCellGeometry(W),null==W||W.relative||O++)}return 0<O||this.isContainer(z)};Graph.prototype.isValidDropTarget=
-function(z,J,O){for(var U=this.getCurrentCellStyle(z),W=!0,ea=!0,ka=0;ka<J.length&&ea;ka++)W=W&&this.isTable(J[ka]),ea=ea&&this.isTableRow(J[ka]);return(1==J.length&&null!=O&&mxEvent.isShiftDown(O)&&!mxEvent.isControlDown(O)&&!mxEvent.isAltDown(O)||("1"!=mxUtils.getValue(U,"part","0")||this.isContainer(z))&&"0"!=mxUtils.getValue(U,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(z))&&!this.isTableRow(z)&&(!this.isTable(z)||ea||W))&&!this.isCellLocked(z)};
-Graph.prototype.createGroupCell=function(){var z=mxGraph.prototype.createGroupCell.apply(this,arguments);z.setStyle("group");return z};Graph.prototype.isExtendParentsOnAdd=function(z){var J=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(J&&null!=z&&null!=this.layoutManager){var O=this.model.getParent(z);null!=O&&(O=this.layoutManager.getLayout(O),null!=O&&O.constructor==mxStackLayout&&(J=!1))}return J};Graph.prototype.getPreferredSizeForCell=function(z){var J=mxGraph.prototype.getPreferredSizeForCell.apply(this,
-arguments);null!=J&&(J.width+=10,J.height+=4,this.gridEnabled&&(J.width=this.snap(J.width),J.height=this.snap(J.height)));return J};Graph.prototype.turnShapes=function(z,J){var O=this.getModel(),U=[];O.beginUpdate();try{for(var W=0;W<z.length;W++){var ea=z[W];if(O.isEdge(ea)){var ka=O.getTerminal(ea,!0),xa=O.getTerminal(ea,!1);O.setTerminal(ea,xa,!0);O.setTerminal(ea,ka,!1);var ta=O.getGeometry(ea);if(null!=ta){ta=ta.clone();null!=ta.points&&ta.points.reverse();var pa=ta.getTerminalPoint(!0),ua=ta.getTerminalPoint(!1);
-ta.setTerminalPoint(pa,!1);ta.setTerminalPoint(ua,!0);O.setGeometry(ea,ta);var Da=this.view.getState(ea),Fa=this.view.getState(ka),Ma=this.view.getState(xa);if(null!=Da){var Qa=null!=Fa?this.getConnectionConstraint(Da,Fa,!0):null,Ba=null!=Ma?this.getConnectionConstraint(Da,Ma,!1):null;this.setConnectionConstraint(ea,ka,!0,Ba);this.setConnectionConstraint(ea,xa,!1,Qa);var Ka=mxUtils.getValue(Da.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
-mxUtils.getValue(Da.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[ea]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Ka,[ea])}U.push(ea)}}else if(O.isVertex(ea)&&(ta=this.getCellGeometry(ea),null!=ta)){if(!(this.isTable(ea)||this.isTableRow(ea)||this.isTableCell(ea)||this.isSwimlane(ea))){ta=ta.clone();ta.x+=ta.width/2-ta.height/2;ta.y+=ta.height/2-ta.width/2;var Oa=ta.width;ta.width=ta.height;ta.height=Oa;O.setGeometry(ea,ta)}var Ya=this.view.getState(ea);if(null!=Ya){var db=
-[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],eb=mxUtils.getValue(Ya.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,db[mxUtils.mod(mxUtils.indexOf(db,eb)+(J?-1:1),db.length)],[ea])}U.push(ea)}}}finally{O.endUpdate()}return U};Graph.prototype.stencilHasPlaceholders=function(z){if(null!=z&&null!=z.fgNode)for(z=z.fgNode.firstChild;null!=z;){if("text"==z.nodeName&&"1"==z.getAttribute("placeholders"))return!0;
-z=z.nextSibling}return!1};var x=Graph.prototype.processChange;Graph.prototype.processChange=function(z){if(z instanceof mxGeometryChange&&(this.isTableCell(z.cell)||this.isTableRow(z.cell))&&(null==z.previous&&null!=z.geometry||null!=z.previous&&!z.previous.equals(z.geometry))){var J=z.cell;this.isTableCell(J)&&(J=this.model.getParent(J));this.isTableRow(J)&&(J=this.model.getParent(J));var O=this.view.getState(J);null!=O&&null!=O.shape&&(this.view.invalidate(J),O.shape.bounds=null)}x.apply(this,arguments);
-z instanceof mxValueChange&&null!=z.cell&&null!=z.cell.value&&"object"==typeof z.cell.value&&this.invalidateDescendantsWithPlaceholders(z.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(z){z=this.model.getDescendants(z);if(0<z.length)for(var J=0;J<z.length;J++){var O=this.view.getState(z[J]);null!=O&&null!=O.shape&&null!=O.shape.stencil&&this.stencilHasPlaceholders(O.shape.stencil)?this.removeStateForCell(z[J]):this.isReplacePlaceholders(z[J])&&this.view.invalidate(z[J],!1,!1)}};
-Graph.prototype.replaceElement=function(z,J){J=z.ownerDocument.createElement(null!=J?J:"span");for(var O=Array.prototype.slice.call(z.attributes);attr=O.pop();)J.setAttribute(attr.nodeName,attr.nodeValue);J.innerHTML=z.innerHTML;z.parentNode.replaceChild(J,z)};Graph.prototype.processElements=function(z,J){if(null!=z){z=z.getElementsByTagName("*");for(var O=0;O<z.length;O++)J(z[O])}};Graph.prototype.updateLabelElements=function(z,J,O){z=null!=z?z:this.getSelectionCells();for(var U=document.createElement("div"),
-W=0;W<z.length;W++)if(this.isHtmlLabel(z[W])){var ea=this.convertValueToString(z[W]);if(null!=ea&&0<ea.length){U.innerHTML=ea;for(var ka=U.getElementsByTagName(null!=O?O:"*"),xa=0;xa<ka.length;xa++)J(ka[xa]);U.innerHTML!=ea&&this.cellLabelChanged(z[W],U.innerHTML)}}};Graph.prototype.cellLabelChanged=function(z,J,O){J=Graph.zapGremlins(J);this.model.beginUpdate();try{if(null!=z.value&&"object"==typeof z.value){if(this.isReplacePlaceholders(z)&&null!=z.getAttribute("placeholder"))for(var U=z.getAttribute("placeholder"),
-W=z;null!=W;){if(W==this.model.getRoot()||null!=W.value&&"object"==typeof W.value&&W.hasAttribute(U)){this.setAttributeForCell(W,U,J);break}W=this.model.getParent(W)}var ea=z.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&ea.hasAttribute("label_"+Graph.diagramLanguage)?ea.setAttribute("label_"+Graph.diagramLanguage,J):ea.setAttribute("label",J);J=ea}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(z){if(null!=
-z){for(var J=new mxDictionary,O=0;O<z.length;O++)J.put(z[O],!0);var U=[];for(O=0;O<z.length;O++){var W=this.model.getParent(z[O]);null==W||J.get(W)||(J.put(W,!0),U.push(W))}for(O=0;O<U.length;O++)if(W=this.view.getState(U[O]),null!=W&&(this.model.isEdge(W.cell)||this.model.isVertex(W.cell))&&this.isCellDeletable(W.cell)&&this.isTransparentState(W)){for(var ea=!0,ka=0;ka<this.model.getChildCount(W.cell)&&ea;ka++)J.get(this.model.getChildAt(W.cell,ka))||(ea=!1);ea&&z.push(W.cell)}}mxGraph.prototype.cellsRemoved.apply(this,
-arguments)};Graph.prototype.removeCellsAfterUngroup=function(z){for(var J=[],O=0;O<z.length;O++)this.isCellDeletable(z[O])&&this.isTransparentState(this.view.getState(z[O]))&&J.push(z[O]);z=J;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(z,J){this.setAttributeForCell(z,"link",J)};Graph.prototype.setTooltipForCell=function(z,J){var O="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(z.value)&&z.value.hasAttribute("tooltip_"+
-Graph.diagramLanguage)&&(O="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(z,O,J)};Graph.prototype.getAttributeForCell=function(z,J,O){z=null!=z.value&&"object"===typeof z.value?z.value.getAttribute(J):null;return null!=z?z:O};Graph.prototype.setAttributeForCell=function(z,J,O){if(null!=z.value&&"object"==typeof z.value)var U=z.value.cloneNode(!0);else U=mxUtils.createXmlDocument().createElement("UserObject"),U.setAttribute("label",z.value||"");null!=O?U.setAttribute(J,O):U.removeAttribute(J);
-this.model.setValue(z,U)};var y=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(z,J,O,U){this.getModel();if(mxEvent.isAltDown(J))return null;for(var W=0;W<z.length;W++){var ea=this.model.getParent(z[W]);if(this.model.isEdge(ea)&&0>mxUtils.indexOf(z,ea))return null}ea=y.apply(this,arguments);var ka=!0;for(W=0;W<z.length&&ka;W++)ka=ka&&this.isTableRow(z[W]);ka&&(this.isTableCell(ea)&&(ea=this.model.getParent(ea)),this.isTableRow(ea)&&(ea=this.model.getParent(ea)),this.isTable(ea)||
-(ea=null));return ea};Graph.prototype.click=function(z){mxGraph.prototype.click.call(this,z);this.firstClickState=z.getState();this.firstClickSource=z.getSource()};Graph.prototype.dblClick=function(z,J){this.isEnabled()&&(J=this.insertTextForEvent(z,J),mxGraph.prototype.dblClick.call(this,z,J))};Graph.prototype.insertTextForEvent=function(z,J){var O=mxUtils.convertPoint(this.container,mxEvent.getClientX(z),mxEvent.getClientY(z));if(null!=z&&!this.model.isVertex(J)){var U=this.model.isEdge(J)?this.view.getState(J):
-null,W=mxEvent.getSource(z);this.firstClickState!=U||this.firstClickSource!=W||null!=U&&null!=U.text&&null!=U.text.node&&null!=U.text.boundingBox&&(mxUtils.contains(U.text.boundingBox,O.x,O.y)||mxUtils.isAncestorNode(U.text.node,mxEvent.getSource(z)))||(null!=U||this.isCellLocked(this.getDefaultParent()))&&(null==U||this.isCellLocked(U.cell))||!(null!=U||mxClient.IS_SVG&&W==this.view.getCanvas().ownerSVGElement)||(null==U&&(U=this.view.getState(this.getCellAt(O.x,O.y))),J=this.addText(O.x,O.y,U))}return J};
-Graph.prototype.getInsertPoint=function(){var z=this.getGridSize(),J=this.container.scrollLeft/this.view.scale-this.view.translate.x,O=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var U=this.getPageLayout(),W=this.getPageSize();J=Math.max(J,U.x*W.width);O=Math.max(O,U.y*W.height)}return new mxPoint(this.snap(J+z),this.snap(O+z))};Graph.prototype.getFreeInsertPoint=function(){var z=this.view,J=this.getGraphBounds(),O=this.getInsertPoint(),U=this.snap(Math.round(Math.max(O.x,
-J.x/z.scale-z.translate.x+(0==J.width?2*this.gridSize:0))));z=this.snap(Math.round(Math.max(O.y,(J.y+J.height)/z.scale-z.translate.y+2*this.gridSize)));return new mxPoint(U,z)};Graph.prototype.getCenterInsertPoint=function(z){z=null!=z?z: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-z.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/
-2)/this.view.scale-this.view.translate.y-z.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-z.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-z.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(z,J,O){var U=new mxCell;U.value="Text";U.geometry=new mxGeometry(0,0,0,0);U.vertex=!0;if(null!=O&&this.model.isEdge(O.cell)){U.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";
-U.geometry.relative=!0;U.connectable=!1;var W=this.view.getRelativePoint(O,z,J);U.geometry.x=Math.round(1E4*W.x)/1E4;U.geometry.y=Math.round(W.y);U.geometry.offset=new mxPoint(0,0);W=this.view.getPoint(O,U.geometry);var ea=this.view.scale;U.geometry.offset=new mxPoint(Math.round((z-W.x)/ea),Math.round((J-W.y)/ea))}else W=this.view.translate,U.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",U.geometry.width=40,U.geometry.height=20,U.geometry.x=Math.round(z/this.view.scale)-
-W.x-(null!=O?O.origin.x:0),U.geometry.y=Math.round(J/this.view.scale)-W.y-(null!=O?O.origin.y:0),U.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([U],null!=O?O.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[U])),this.autoSizeCell(U)}finally{this.getModel().endUpdate()}return U};Graph.prototype.addClickHandler=function(z,J,O){var U=mxUtils.bind(this,function(){var ta=this.container.getElementsByTagName("a");if(null!=ta)for(var pa=0;pa<ta.length;pa++){var ua=
-this.getAbsoluteUrl(ta[pa].getAttribute("href"));null!=ua&&(ta[pa].setAttribute("rel",this.linkRelation),ta[pa].setAttribute("href",ua),null!=J&&mxEvent.addGestureListeners(ta[pa],null,null,J))}});this.model.addListener(mxEvent.CHANGE,U);U();var W=this.container.style.cursor,ea=this.getTolerance(),ka=this,xa={currentState:null,currentLink:null,currentTarget:null,highlight:null!=z&&""!=z&&z!=mxConstants.NONE?new mxCellHighlight(ka,z,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(ta){var pa=
-ta.sourceState;if(null==pa||null==ka.getLinkForCell(pa.cell))ta=ka.getCellAt(ta.getGraphX(),ta.getGraphY(),null,null,null,function(ua,Da,Fa){return null==ka.getLinkForCell(ua.cell)}),pa=null==pa||ka.model.isAncestor(ta,pa.cell)?ka.view.getState(ta):null;pa!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=pa,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(ta,pa){this.startX=pa.getGraphX();this.startY=pa.getGraphY();this.scrollLeft=ka.container.scrollLeft;
-this.scrollTop=ka.container.scrollTop;null==this.currentLink&&"auto"==ka.container.style.overflow&&(ka.container.style.cursor="move");this.updateCurrentState(pa)},mouseMove:function(ta,pa){if(ka.isMouseDown)null!=this.currentLink&&(ta=Math.abs(this.startX-pa.getGraphX()),pa=Math.abs(this.startY-pa.getGraphY()),(ta>ea||pa>ea)&&this.clear());else{for(ta=pa.getSource();null!=ta&&"a"!=ta.nodeName.toLowerCase();)ta=ta.parentNode;null!=ta?this.clear():(null!=ka.tooltipHandler&&null!=this.currentLink&&null!=
-this.currentState&&ka.tooltipHandler.reset(pa,!0,this.currentState),(null==this.currentState||pa.getState()!=this.currentState&&null!=pa.sourceState||!ka.intersects(this.currentState,pa.getGraphX(),pa.getGraphY()))&&this.updateCurrentState(pa))}},mouseUp:function(ta,pa){var ua=pa.getSource();for(ta=pa.getEvent();null!=ua&&"a"!=ua.nodeName.toLowerCase();)ua=ua.parentNode;null==ua&&Math.abs(this.scrollLeft-ka.container.scrollLeft)<ea&&Math.abs(this.scrollTop-ka.container.scrollTop)<ea&&(null==pa.sourceState||
-!pa.isSource(pa.sourceState.control))&&((mxEvent.isLeftMouseButton(ta)||mxEvent.isMiddleMouseButton(ta))&&!mxEvent.isPopupTrigger(ta)||mxEvent.isTouchEvent(ta))&&(null!=this.currentLink?(ua=ka.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&ua||null==J||J(ta,this.currentLink),mxEvent.isConsumed(ta)||(ta=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(ta)?"_blank":ua?ka.linkTarget:"_top",ka.openLink(this.currentLink,ta),pa.consume())):null!=O&&!pa.isConsumed()&&
-Math.abs(this.scrollLeft-ka.container.scrollLeft)<ea&&Math.abs(this.scrollTop-ka.container.scrollTop)<ea&&Math.abs(this.startX-pa.getGraphX())<ea&&Math.abs(this.startY-pa.getGraphY())<ea&&O(pa.getEvent()));this.clear()},activate:function(ta){this.currentLink=ka.getAbsoluteUrl(ka.getLinkForCell(ta.cell));null!=this.currentLink&&(this.currentTarget=ka.getLinkTargetForCell(ta.cell),ka.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(ta))},clear:function(){null!=ka.container&&
-(ka.container.style.cursor=W);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=ka.tooltipHandler&&ka.tooltipHandler.hide()}};ka.click=function(ta){};ka.addMouseListener(xa);mxEvent.addListener(document,"mouseleave",function(ta){xa.clear()})};Graph.prototype.duplicateCells=function(z,J){z=null!=z?z:this.getSelectionCells();J=null!=J?J:!0;for(var O=0;O<z.length;O++)this.isTableCell(z[O])&&(z[O]=this.model.getParent(z[O]));z=this.model.getTopmostCells(z);
-var U=this.getModel(),W=this.gridSize,ea=[];U.beginUpdate();try{var ka={},xa=this.createCellLookup(z),ta=this.cloneCells(z,!1,ka,!0);for(O=0;O<z.length;O++){var pa=U.getParent(z[O]);if(null!=pa){var ua=this.moveCells([ta[O]],W,W,!1)[0];ea.push(ua);if(J)U.add(pa,ta[O]);else{var Da=pa.getIndex(z[O]);U.add(pa,ta[O],Da+1)}if(this.isTable(pa)){var Fa=this.getCellGeometry(ta[O]),Ma=this.getCellGeometry(pa);null!=Fa&&null!=Ma&&(Ma=Ma.clone(),Ma.height+=Fa.height,U.setGeometry(pa,Ma))}}else ea.push(ta[O])}this.updateCustomLinks(this.createCellMapping(ka,
-xa),ta,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",ta))}finally{U.endUpdate()}return ea};Graph.prototype.insertImage=function(z,J,O){if(null!=z&&null!=this.cellEditor.textarea){for(var U=this.cellEditor.textarea.getElementsByTagName("img"),W=[],ea=0;ea<U.length;ea++)W.push(U[ea]);document.execCommand("insertimage",!1,z);z=this.cellEditor.textarea.getElementsByTagName("img");if(z.length==W.length+1)for(ea=z.length-1;0<=ea;ea--)if(0==ea||z[ea]!=W[ea-1]){z[ea].setAttribute("width",
-J);z[ea].setAttribute("height",O);break}}};Graph.prototype.insertLink=function(z){if(null!=this.cellEditor.textarea)if(0==z.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var J=this.cellEditor.textarea.getElementsByTagName("a"),O=[],U=0;U<J.length;U++)O.push(J[U]);document.execCommand("createlink",!1,mxUtils.trim(z));J=this.cellEditor.textarea.getElementsByTagName("a");if(J.length==O.length+1)for(U=J.length-1;0<=U;U--)if(J[U]!=O[U-1]){for(J=J[U].getElementsByTagName("a");0<J.length;){for(O=
-J[0].parentNode;null!=J[0].firstChild;)O.insertBefore(J[0].firstChild,J[0]);O.removeChild(J[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(z))};Graph.prototype.isCellResizable=function(z){var J=mxGraph.prototype.isCellResizable.apply(this,arguments),O=this.getCurrentCellStyle(z);return!this.isTableCell(z)&&!this.isTableRow(z)&&(J||"0"!=mxUtils.getValue(O,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==O[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(z,J){null==
-J&&(J=this.getSelectionCells());if(null!=J&&1<J.length){for(var O=[],U=null,W=null,ea=0;ea<J.length;ea++)if(this.getModel().isVertex(J[ea])){var ka=this.view.getState(J[ea]);if(null!=ka){var xa=z?ka.getCenterX():ka.getCenterY();U=null!=U?Math.max(U,xa):xa;W=null!=W?Math.min(W,xa):xa;O.push(ka)}}if(2<O.length){O.sort(function(Da,Fa){return z?Da.x-Fa.x:Da.y-Fa.y});ka=this.view.translate;xa=this.view.scale;W=W/xa-(z?ka.x:ka.y);U=U/xa-(z?ka.x:ka.y);this.getModel().beginUpdate();try{var ta=(U-W)/(O.length-
-1);U=W;for(ea=1;ea<O.length-1;ea++){var pa=this.view.getState(this.model.getParent(O[ea].cell)),ua=this.getCellGeometry(O[ea].cell);U+=ta;null!=ua&&null!=pa&&(ua=ua.clone(),z?ua.x=Math.round(U-ua.width/2)-pa.origin.x:ua.y=Math.round(U-ua.height/2)-pa.origin.y,this.getModel().setGeometry(O[ea].cell,ua))}}finally{this.getModel().endUpdate()}}}return J};Graph.prototype.isCloneEvent=function(z){return mxClient.IS_MAC&&mxEvent.isMetaDown(z)||mxEvent.isControlDown(z)};Graph.prototype.createSvgImageExport=
-function(){var z=new mxImageExport;z.getLinkForCellState=mxUtils.bind(this,function(J,O){return this.getLinkForCell(J.cell)});return z};Graph.prototype.parseBackgroundImage=function(z){var J=null;null!=z&&0<z.length&&(z=JSON.parse(z),J=new mxImage(z.src,z.width,z.height));return J};Graph.prototype.getBackgroundImageObject=function(z){return z};Graph.prototype.getSvg=function(z,J,O,U,W,ea,ka,xa,ta,pa,ua,Da,Fa,Ma){var Qa=null;if(null!=Ma)for(Qa=new mxDictionary,ua=0;ua<Ma.length;ua++)Qa.put(Ma[ua],
-!0);if(Ma=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{J=null!=J?J:1;O=null!=O?O:0;W=null!=W?W:!0;ea=null!=ea?ea:!0;ka=null!=ka?ka:!0;pa=null!=pa?pa:!1;var Ba="page"==Fa?this.view.getBackgroundPageBounds():ea&&null==Qa||U||"diagram"==Fa?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),Ka=this.view.scale;"diagram"==Fa&&null!=this.backgroundImage&&(Ba=mxRectangle.fromRectangle(Ba),Ba.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*
-Ka,(this.view.translate.y+this.backgroundImage.y)*Ka,this.backgroundImage.width*Ka,this.backgroundImage.height*Ka)));if(null==Ba)throw Error(mxResources.get("drawingEmpty"));U=J/Ka;Fa=W?-.5:0;var Oa=Graph.createSvgNode(Fa,Fa,Math.max(1,Math.ceil(Ba.width*U)+2*O)+(pa&&0==O?5:0),Math.max(1,Math.ceil(Ba.height*U)+2*O)+(pa&&0==O?5:0),z),Ya=Oa.ownerDocument,db=null!=Ya.createElementNS?Ya.createElementNS(mxConstants.NS_SVG,"g"):Ya.createElement("g");Oa.appendChild(db);var eb=this.createSvgCanvas(db);eb.foOffset=
-W?-.5:0;eb.textOffset=W?-.5:0;eb.imageOffset=W?-.5:0;eb.translate(Math.floor(O/J-Ba.x/Ka),Math.floor(O/J-Ba.y/Ka));var cb=document.createElement("div"),ub=eb.getAlternateText;eb.getAlternateText=function(ab,ib,gb,qb,nb,mb,Bb,wb,rb,vb,kb,hb,tb){if(null!=mb&&0<this.state.fontSize)try{mxUtils.isNode(mb)?mb=mb.innerText:(cb.innerHTML=mb,mb=mxUtils.extractTextWithWhitespace(cb.childNodes));for(var Cb=Math.ceil(2*qb/this.state.fontSize),xb=[],zb=0,ob=0;(0==Cb||zb<Cb)&&ob<mb.length;){var yb=mb.charCodeAt(ob);
-if(10==yb||13==yb){if(0<zb)break}else xb.push(mb.charAt(ob)),255>yb&&zb++;ob++}xb.length<mb.length&&1<mb.length-xb.length&&(mb=mxUtils.trim(xb.join(""))+"...");return mb}catch(Ab){return ub.apply(this,arguments)}else return ub.apply(this,arguments)};var fb=this.backgroundImage;if(null!=fb){z=Ka/J;var pb=this.view.translate;Fa=new mxRectangle((fb.x+pb.x)*z,(fb.y+pb.y)*z,fb.width*z,fb.height*z);mxUtils.intersects(Ba,Fa)&&eb.image(fb.x+pb.x,fb.y+pb.y,fb.width,fb.height,fb.src,!0)}eb.scale(U);eb.textEnabled=
-ka;xa=null!=xa?xa:this.createSvgImageExport();var lb=xa.drawCellState,$a=xa.getLinkForCellState;xa.getLinkForCellState=function(ab,ib){var gb=$a.apply(this,arguments);return null==gb||ab.view.graph.isCustomLink(gb)?null:gb};xa.getLinkTargetForCellState=function(ab,ib){return ab.view.graph.getLinkTargetForCell(ab.cell)};xa.drawCellState=function(ab,ib){for(var gb=ab.view.graph,qb=null!=Qa?Qa.get(ab.cell):gb.isCellSelected(ab.cell),nb=gb.model.getParent(ab.cell);!(ea&&null==Qa||qb)&&null!=nb;)qb=null!=
-Qa?Qa.get(nb):gb.isCellSelected(nb),nb=gb.model.getParent(nb);if(ea&&null==Qa||qb)gb.view.redrawEnumerationState(ab),lb.apply(this,arguments),this.doDrawShape(ab.secondLabel,ib)};xa.drawState(this.getView().getState(this.model.root),eb);this.updateSvgLinks(Oa,ta,!0);this.addForeignObjectWarning(eb,Oa);return Oa}finally{Ma&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(z,J){if("0"!=urlParams["svg-warning"]&&0<J.getElementsByTagName("foreignObject").length){var O=
-z.createElement("switch"),U=z.createElement("g");U.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var W=z.createElement("a");W.setAttribute("transform","translate(0,-5)");null==W.setAttributeNS||J.ownerDocument!=document&&null==document.documentMode?(W.setAttribute("xlink:href",Graph.foreignObjectWarningLink),W.setAttribute("target","_blank")):(W.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),W.setAttributeNS(mxConstants.NS_XLINK,
-"target","_blank"));z=z.createElement("text");z.setAttribute("text-anchor","middle");z.setAttribute("font-size","10px");z.setAttribute("x","50%");z.setAttribute("y","100%");mxUtils.write(z,Graph.foreignObjectWarningText);O.appendChild(U);W.appendChild(z);O.appendChild(W);J.appendChild(O)}};Graph.prototype.updateSvgLinks=function(z,J,O){z=z.getElementsByTagName("a");for(var U=0;U<z.length;U++)if(null==z[U].getAttribute("target")){var W=z[U].getAttribute("href");null==W&&(W=z[U].getAttribute("xlink:href"));
-null!=W&&(null!=J&&/^https?:\/\//.test(W)?z[U].setAttribute("target",J):O&&this.isCustomLink(W)&&z[U].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(z){z=new mxSvgCanvas2D(z);z.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;z.pointerEvents=!0;return z};Graph.prototype.getSelectedElement=function(){var z=null;if(window.getSelection){var J=window.getSelection();J.getRangeAt&&J.rangeCount&&(z=J.getRangeAt(0).commonAncestorContainer)}else document.selection&&
-(z=document.selection.createRange().parentElement());return z};Graph.prototype.getSelectedEditingElement=function(){for(var z=this.getSelectedElement();null!=z&&z.nodeType!=mxConstants.NODETYPE_ELEMENT;)z=z.parentNode;null!=z&&z==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(z=this.cellEditor.textarea.firstChild);return z};Graph.prototype.getParentByName=function(z,J,O){for(;null!=z&&z.nodeName!=
-J;){if(z==O)return null;z=z.parentNode}return z};Graph.prototype.getParentByNames=function(z,J,O){for(;null!=z&&!(0<=mxUtils.indexOf(J,z.nodeName));){if(z==O)return null;z=z.parentNode}return z};Graph.prototype.selectNode=function(z){var J=null;if(window.getSelection){if(J=window.getSelection(),J.getRangeAt&&J.rangeCount){var O=document.createRange();O.selectNode(z);J.removeAllRanges();J.addRange(O)}}else(J=document.selection)&&"Control"!=J.type&&(z=J.createRange(),z.collapse(!0),O=J.createRange(),
-O.setEndPoint("StartToStart",z),O.select())};Graph.prototype.flipEdgePoints=function(z,J,O){var U=this.getCellGeometry(z);if(null!=U){U=U.clone();if(null!=U.points)for(var W=0;W<U.points.length;W++)J?U.points[W].x=O+(O-U.points[W].x):U.points[W].y=O+(O-U.points[W].y);W=function(ea){null!=ea&&(J?ea.x=O+(O-ea.x):ea.y=O+(O-ea.y))};W(U.getTerminalPoint(!0));W(U.getTerminalPoint(!1));this.model.setGeometry(z,U)}};Graph.prototype.flipChildren=function(z,J,O){this.model.beginUpdate();try{for(var U=this.model.getChildCount(z),
-W=0;W<U;W++){var ea=this.model.getChildAt(z,W);if(this.model.isEdge(ea))this.flipEdgePoints(ea,J,O);else{var ka=this.getCellGeometry(ea);null!=ka&&(ka=ka.clone(),J?ka.x=O+(O-ka.x-ka.width):ka.y=O+(O-ka.y-ka.height),this.model.setGeometry(ea,ka))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(z,J){this.model.beginUpdate();try{z=this.model.getTopmostCells(z);for(var O=[],U=0;U<z.length;U++)if(this.model.isEdge(z[U])){var W=this.view.getState(z[U]);null!=W&&this.flipEdgePoints(z[U],
-J,(J?W.getCenterX():W.getCenterY())/this.view.scale-(J?W.origin.x:W.origin.y)-(J?this.view.translate.x:this.view.translate.y))}else{var ea=this.getCellGeometry(z[U]);null!=ea&&this.flipChildren(z[U],J,J?ea.getCenterX()-ea.x:ea.getCenterY()-ea.y);O.push(z[U])}this.toggleCellStyles(J?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,O)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(z,J){var O=null;if(null!=z&&0<z.length){this.model.beginUpdate();try{for(var U=0;U<z.length;U++){var W=
-this.model.getParent(z[U]);if(this.isTable(W)){var ea=this.getCellGeometry(z[U]),ka=this.getCellGeometry(W);null!=ea&&null!=ka&&(ka=ka.clone(),ka.height-=ea.height,this.model.setGeometry(W,ka))}}var xa=this.selectParentAfterDelete?this.model.getParents(z):null;this.removeCells(z,J)}finally{this.model.endUpdate()}if(null!=xa)for(O=[],U=0;U<xa.length;U++)this.model.contains(xa[U])&&(this.model.isVertex(xa[U])||this.model.isEdge(xa[U]))&&O.push(xa[U])}return O};Graph.prototype.insertTableColumn=function(z,
-J){var O=this.getModel();O.beginUpdate();try{var U=z,W=0;if(this.isTableCell(z)){var ea=O.getParent(z);U=O.getParent(ea);W=mxUtils.indexOf(O.getChildCells(ea,!0),z)}else this.isTableRow(z)?U=O.getParent(z):z=O.getChildCells(U,!0)[0],J||(W=O.getChildCells(z,!0).length-1);var ka=O.getChildCells(U,!0),xa=Graph.minTableColumnWidth;for(z=0;z<ka.length;z++){var ta=O.getChildCells(ka[z],!0)[W],pa=O.cloneCell(ta,!1),ua=this.getCellGeometry(pa);pa.value=null;pa.style=mxUtils.setStyle(mxUtils.setStyle(pa.style,
-"rowspan",null),"colspan",null);if(null!=ua){null!=ua.alternateBounds&&(ua.width=ua.alternateBounds.width,ua.height=ua.alternateBounds.height,ua.alternateBounds=null);xa=ua.width;var Da=this.getCellGeometry(ka[z]);null!=Da&&(ua.height=Da.height)}O.add(ka[z],pa,W+(J?0:1))}var Fa=this.getCellGeometry(U);null!=Fa&&(Fa=Fa.clone(),Fa.width+=xa,O.setGeometry(U,Fa))}finally{O.endUpdate()}};Graph.prototype.deleteLane=function(z){var J=this.getModel();J.beginUpdate();try{var O=null;O="stackLayout"==this.getCurrentCellStyle(z).childLayout?
-z:J.getParent(z);var U=J.getChildCells(O,!0);0==U.length?J.remove(O):(O==z&&(z=U[U.length-1]),J.remove(z))}finally{J.endUpdate()}};Graph.prototype.insertLane=function(z,J){var O=this.getModel();O.beginUpdate();try{var U=null;if("stackLayout"==this.getCurrentCellStyle(z).childLayout){U=z;var W=O.getChildCells(U,!0);z=W[J?0:W.length-1]}else U=O.getParent(z);var ea=U.getIndex(z);z=O.cloneCell(z,!1);z.value=null;O.add(U,z,ea+(J?0:1))}finally{O.endUpdate()}};Graph.prototype.insertTableRow=function(z,J){var O=
-this.getModel();O.beginUpdate();try{var U=z,W=z;if(this.isTableCell(z))W=O.getParent(z),U=O.getParent(W);else if(this.isTableRow(z))U=O.getParent(z);else{var ea=O.getChildCells(U,!0);W=ea[J?0:ea.length-1]}var ka=O.getChildCells(W,!0),xa=U.getIndex(W);W=O.cloneCell(W,!1);W.value=null;var ta=this.getCellGeometry(W);if(null!=ta){for(ea=0;ea<ka.length;ea++){z=O.cloneCell(ka[ea],!1);z.value=null;z.style=mxUtils.setStyle(mxUtils.setStyle(z.style,"rowspan",null),"colspan",null);var pa=this.getCellGeometry(z);
-null!=pa&&(null!=pa.alternateBounds&&(pa.width=pa.alternateBounds.width,pa.height=pa.alternateBounds.height,pa.alternateBounds=null),pa.height=ta.height);W.insert(z)}O.add(U,W,xa+(J?0:1));var ua=this.getCellGeometry(U);null!=ua&&(ua=ua.clone(),ua.height+=ta.height,O.setGeometry(U,ua))}}finally{O.endUpdate()}};Graph.prototype.deleteTableColumn=function(z){var J=this.getModel();J.beginUpdate();try{var O=z,U=z;this.isTableCell(z)&&(U=J.getParent(z));this.isTableRow(U)&&(O=J.getParent(U));var W=J.getChildCells(O,
-!0);if(0==W.length)J.remove(O);else{this.isTableRow(U)||(U=W[0]);var ea=J.getChildCells(U,!0);if(1>=ea.length)J.remove(O);else{var ka=ea.length-1;this.isTableCell(z)&&(ka=mxUtils.indexOf(ea,z));for(U=z=0;U<W.length;U++){var xa=J.getChildCells(W[U],!0)[ka];J.remove(xa);var ta=this.getCellGeometry(xa);null!=ta&&(z=Math.max(z,ta.width))}var pa=this.getCellGeometry(O);null!=pa&&(pa=pa.clone(),pa.width-=z,J.setGeometry(O,pa))}}}finally{J.endUpdate()}};Graph.prototype.deleteTableRow=function(z){var J=this.getModel();
-J.beginUpdate();try{var O=z,U=z;this.isTableCell(z)&&(z=U=J.getParent(z));this.isTableRow(z)&&(O=J.getParent(U));var W=J.getChildCells(O,!0);if(1>=W.length)J.remove(O);else{this.isTableRow(U)||(U=W[W.length-1]);J.remove(U);z=0;var ea=this.getCellGeometry(U);null!=ea&&(z=ea.height);var ka=this.getCellGeometry(O);null!=ka&&(ka=ka.clone(),ka.height-=z,J.setGeometry(O,ka))}}finally{J.endUpdate()}};Graph.prototype.insertRow=function(z,J){for(var O=z.tBodies[0],U=O.rows[0].cells,W=z=0;W<U.length;W++){var ea=
-U[W].getAttribute("colspan");z+=null!=ea?parseInt(ea):1}J=O.insertRow(J);for(W=0;W<z;W++)mxUtils.br(J.insertCell(-1));return J.cells[0]};Graph.prototype.deleteRow=function(z,J){z.tBodies[0].deleteRow(J)};Graph.prototype.insertColumn=function(z,J){var O=z.tHead;if(null!=O)for(var U=0;U<O.rows.length;U++){var W=document.createElement("th");O.rows[U].appendChild(W);mxUtils.br(W)}z=z.tBodies[0];for(O=0;O<z.rows.length;O++)U=z.rows[O].insertCell(J),mxUtils.br(U);return z.rows[0].cells[0<=J?J:z.rows[0].cells.length-
-1]};Graph.prototype.deleteColumn=function(z,J){if(0<=J){z=z.tBodies[0].rows;for(var O=0;O<z.length;O++)z[O].cells.length>J&&z[O].deleteCell(J)}};Graph.prototype.pasteHtmlAtCaret=function(z){if(window.getSelection){var J=window.getSelection();if(J.getRangeAt&&J.rangeCount){J=J.getRangeAt(0);J.deleteContents();var O=document.createElement("div");O.innerHTML=z;z=document.createDocumentFragment();for(var U;U=O.firstChild;)lastNode=z.appendChild(U);J.insertNode(z)}}else(J=document.selection)&&"Control"!=
-J.type&&J.createRange().pasteHTML(z)};Graph.prototype.createLinkForHint=function(z,J){function O(W,ea){W.length>ea&&(W=W.substring(0,Math.round(ea/2))+"..."+W.substring(W.length-Math.round(ea/4)));return W}z=null!=z?z:"javascript:void(0);";if(null==J||0==J.length)J=this.isCustomLink(z)?this.getLinkTitle(z):z;var U=document.createElement("a");U.setAttribute("rel",this.linkRelation);U.setAttribute("href",this.getAbsoluteUrl(z));U.setAttribute("title",O(this.isCustomLink(z)?this.getLinkTitle(z):z,80));
-null!=this.linkTarget&&U.setAttribute("target",this.linkTarget);mxUtils.write(U,O(J,40));this.isCustomLink(z)&&mxEvent.addListener(U,"click",mxUtils.bind(this,function(W){this.customLinkClicked(z);mxEvent.consume(W)}));return U};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(ea,ka){this.popupMenuHandler.hideMenu()});var z=this.updateMouseEvent;this.updateMouseEvent=
-function(ea){ea=z.apply(this,arguments);if(mxEvent.isTouchEvent(ea.getEvent())&&null==ea.getState()){var ka=this.getCellAt(ea.graphX,ea.graphY);null!=ka&&this.isSwimlane(ka)&&this.hitsSwimlaneContent(ka,ea.graphX,ea.graphY)||(ea.state=this.view.getState(ka),null!=ea.state&&null!=ea.state.shape&&(this.container.style.cursor=ea.state.shape.node.style.cursor))}null==ea.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return ea};var J=!1,O=!1,U=!1,W=this.fireMouseEvent;this.fireMouseEvent=
-function(ea,ka,xa){ea==mxEvent.MOUSE_DOWN&&(ka=this.updateMouseEvent(ka),J=this.isCellSelected(ka.getCell()),O=this.isSelectionEmpty(),U=this.popupMenuHandler.isMenuShowing());W.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(ea,ka){var xa=mxEvent.isMouseEvent(ka.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==ka.getState()||!ka.isSource(ka.getState().control))&&(this.popupMenuHandler.popupTrigger||!U&&!xa&&(O&&null==ka.getCell()&&
-this.isSelectionEmpty()||J&&this.isCellSelected(ka.getCell())));xa=!J||xa?null:mxUtils.bind(this,function(ta){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var pa=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(ka.getX()+pa.x+1,ka.getY()+pa.y+1,ta,ka.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[ea,ka,xa])})};mxCellEditor.prototype.isContentEditing=function(){var z=this.graph.view.getState(this.editingCell);return null!=z&&1==
-z.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var z="";window.getSelection?z=window.getSelection():document.getSelection?z=document.getSelection():document.selection&&(z=document.selection.createRange().text);return""!=z};mxCellEditor.prototype.insertTab=function(z){var J=this.textarea.ownerDocument.defaultView.getSelection(),O=J.getRangeAt(0),
-U="\t";if(null!=z)for(U="";0<z;)U+=" ",z--;z=document.createElement("span");z.style.whiteSpace="pre";z.appendChild(document.createTextNode(U));O.insertNode(z);O.setStartAfter(z);O.setEndAfter(z);J.removeAllRanges();J.addRange(O)};mxCellEditor.prototype.alignText=function(z,J){var O=null!=J&&mxEvent.isShiftDown(J);if(O||null!=window.getSelection&&null!=window.getSelection().containsNode){var U=!0;this.graph.processElements(this.textarea,function(W){O||window.getSelection().containsNode(W,!0)?(W.removeAttribute("align"),
-W.style.textAlign=null):U=!1});U&&this.graph.cellEditor.setAlign(z)}document.execCommand("justify"+z.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var z=window.getSelection();if(z.getRangeAt&&z.rangeCount){for(var J=[],O=0,U=z.rangeCount;O<U;++O)J.push(z.getRangeAt(O));return J}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(z){try{if(z)if(window.getSelection){sel=
-window.getSelection();sel.removeAllRanges();for(var J=0,O=z.length;J<O;++J)sel.addRange(z[J])}else document.selection&&z.select&&z.select()}catch(U){}};var t=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(z){null!=z.text&&(z.text.replaceLinefeeds="0"!=mxUtils.getValue(z.style,"nl2Br","1"));t.apply(this,arguments)};var G=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(z,J){this.isKeepFocusEvent(z)||!mxEvent.isAltDown(z.getEvent())?
-G.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(z){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var D=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(z,J){z=this.graph.getStartEditingCell(z,J);D.apply(this,arguments);var O=this.graph.view.getState(z);this.textarea.className=null!=O&&1==O.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";
-this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(z);O=this.graph.getModel().getParent(z);var U=this.graph.getCellGeometry(z);if(this.graph.getModel().isEdge(O)&&null!=U&&U.relative||this.graph.getModel().isEdge(z))this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var I=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(z){function J(W,ea){ea.originalNode=W;W=W.firstChild;
-for(var ka=ea.firstChild;null!=W&&null!=ka;)J(W,ka),W=W.nextSibling,ka=ka.nextSibling;return ea}function O(W,ea){if(null!=W)if(ea.originalNode!=W)U(W);else for(W=W.firstChild,ea=ea.firstChild;null!=W;){var ka=W.nextSibling;null==ea?U(W):(O(W,ea),ea=ea.nextSibling);W=ka}}function U(W){for(var ea=W.firstChild;null!=ea;){var ka=ea.nextSibling;U(ea);ea=ka}1==W.nodeType&&("BR"===W.nodeName||null!=W.firstChild)||3==W.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(W)).length?(3==W.nodeType&&mxUtils.setTextContent(W,
-mxUtils.getTextContent(W).replace(/\n|\r/g,"")),1==W.nodeType&&(W.removeAttribute("style"),W.removeAttribute("class"),W.removeAttribute("width"),W.removeAttribute("cellpadding"),W.removeAttribute("cellspacing"),W.removeAttribute("border"))):W.parentNode.removeChild(W)}I.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(W){var ea=J(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,
-function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?O(this.textarea,ea):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var z=this.graph.view.getState(this.editingCell);if(null!=z){var J=null!=z&&"0"!=mxUtils.getValue(z.style,"nl2Br","1"),O=this.saveSelection();if(this.codeViewMode){xa=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);
-0<xa.length&&"\n"==xa.charAt(xa.length-1)&&(xa=xa.substring(0,xa.length-1));xa=this.graph.sanitizeHtml(J?xa.replace(/\n/g,"<br/>"):xa,!0);this.textarea.className="mxCellEditor geContentEditable";ta=mxUtils.getValue(z.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);J=mxUtils.getValue(z.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var U=mxUtils.getValue(z.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),W=(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,
-0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,ea=(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,ka=[];(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&ka.push("underline");(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&ka.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=ka.join(" ");this.textarea.style.fontWeight=W?"bold":"normal";this.textarea.style.fontStyle=ea?"italic":"";this.textarea.style.fontFamily=J;this.textarea.style.textAlign=U;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));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");var xa=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(xa=mxUtils.replaceTrailingNewlines(xa,"<div><br></div>"));xa=this.graph.sanitizeHtml(J?xa.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):xa,!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=O;this.resize()}};var H=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(z,J){if(null!=this.textarea)if(z=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=z){var O=z.view.scale;this.bounds=mxRectangle.fromRectangle(z);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*O;this.bounds.height=
-60*O;var U=null!=z.text?z.text.margin:null;null==U&&(U=mxUtils.getAlignmentAsPoint(mxUtils.getValue(z.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(z.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=U.x*this.bounds.width;this.bounds.y+=U.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/O)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/O)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<
-this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/O)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*O);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/O)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*O);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("+O+","+O+")")}else this.textarea.style.height="",this.textarea.style.overflow="",H.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(z,J){if("0"==mxUtils.getValue(z.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var O=this.graph.getEditingValue(z.cell,J);"1"==mxUtils.getValue(z.style,"nl2Br",
-"1")&&(O=O.replace(/\n/g,"<br/>"));return O=this.graph.sanitizeHtml(O,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(z){if("0"==mxUtils.getValue(z.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var J=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return J="1"==mxUtils.getValue(z.style,"nl2Br","1")?J.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):J.replace(/\r\n/g,"").replace(/\n/g,"")};var S=
-mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(z){this.codeViewMode&&this.toggleViewMode();S.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(z){}};var T=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(z,J){this.graph.getModel().beginUpdate();try{T.apply(this,arguments),""==J&&this.graph.isCellDeletable(z.cell)&&0==this.graph.model.getChildCount(z.cell)&&
-this.graph.isTransparentState(z)&&this.graph.removeCells([z.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(z){var J=mxUtils.getValue(z.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=J&&J!=mxConstants.NONE||!(null!=z.cell.geometry&&0<z.cell.geometry.width)||0==mxUtils.getValue(z.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(z.style,mxConstants.STYLE_HORIZONTAL,1)||(J=mxUtils.getValue(z.style,mxConstants.STYLE_FILLCOLOR,
-null));J==mxConstants.NONE&&(J=null);return J};mxCellEditor.prototype.getBorderColor=function(z){var J=mxUtils.getValue(z.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);null!=J&&J!=mxConstants.NONE||!(null!=z.cell.geometry&&0<z.cell.geometry.width)||0==mxUtils.getValue(z.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(z.style,mxConstants.STYLE_HORIZONTAL,1)||(J=mxUtils.getValue(z.style,mxConstants.STYLE_STROKECOLOR,null));J==mxConstants.NONE&&(J=null);return J};mxCellEditor.prototype.getMinimumSize=
-function(z){var J=this.graph.getView().scale;return new mxRectangle(0,0,null==z.text?30:z.text.size*J+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(z,J){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(J.getEvent)};mxGraphView.prototype.formatUnitText=function(z){return z?e(z,this.unit):z};mxGraphHandler.prototype.updateHint=function(z){if(null!=this.pBounds&&(null!=this.shape||
-this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var J=this.graph.view.translate,O=this.graph.view.scale;z=this.roundLength((this.bounds.x+this.currentDx)/O-J.x);J=this.roundLength((this.bounds.y+this.currentDy)/O-J.y);O=this.graph.view.unit;this.hint.innerHTML=e(z,O)+", "+e(J,O);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+
-Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var M=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(z,J){M.apply(this,arguments);var O=this.graph.getCellStyle(z);if(null==O.childLayout){var U=this.graph.model.getParent(z),W=null!=U?this.graph.getCellGeometry(U):null;if(null!=W&&(O=this.graph.getCellStyle(U),"stackLayout"==O.childLayout)){var ea=parseFloat(mxUtils.getValue(O,
-"stackBorder",mxStackLayout.prototype.border));O="1"==mxUtils.getValue(O,"horizontalStack","1");var ka=this.graph.getActualStartSize(U);W=W.clone();O?W.height=J.height+ka.y+ka.height+2*ea:W.width=J.width+ka.x+ka.width+2*ea;this.graph.model.setGeometry(U,W)}}};var fa=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function z(xa){O.get(xa)||(O.put(xa,!0),W.push(xa))}for(var J=fa.apply(this,arguments),O=new mxDictionary,
-U=this.graph.model,W=[],ea=0;ea<J.length;ea++){var ka=J[ea];this.graph.isTableCell(ka)?z(U.getParent(U.getParent(ka))):this.graph.isTableRow(ka)&&z(U.getParent(ka));z(ka)}return W};var la=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(z){var J=la.apply(this,arguments);J.stroke="#C0C0C0";J.strokewidth=1;return J};var ra=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(z){var J=
-ra.apply(this,arguments);J.stroke="#C0C0C0";J.strokewidth=1;return J};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var z=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+z.x/2,this.bounds.y+this.rotationHandleVSpacing-z.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(z,J){return this.graph.isRecursiveVertexResize(z)&&!mxEvent.isAltDown(J.getEvent())};mxVertexHandler.prototype.isCenteredEvent=
-function(z,J){return mxEvent.isControlDown(J.getEvent())||mxEvent.isMetaDown(J.getEvent())};var ba=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return ba.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 oa=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return oa.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var na=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(z){return z.tableHandle||na.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=
-function(){var z=0;this.graph.isTableRow(this.state.cell)?z=1:this.graph.isTableCell(this.state.cell)&&(z=2);return z};var N=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return N.apply(this,arguments).grow(-this.getSelectionBorderInset())};var aa=null,V=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==aa&&(aa=mxCellRenderer.defaultShapes.tableLine);var z=V.apply(this,arguments);
-if(this.graph.isTable(this.state.cell)){var J=function(Qa,Ba,Ka){for(var Oa=[],Ya=0;Ya<Qa.length;Ya++){var db=Qa[Ya];Oa.push(null==db?null:new mxPoint((ta+db.x+Ba)*ea,(pa+db.y+Ka)*ea))}return Oa},O=this,U=this.graph,W=U.model,ea=U.view.scale,ka=this.state,xa=this.selectionBorder,ta=this.state.origin.x+U.view.translate.x,pa=this.state.origin.y+U.view.translate.y;null==z&&(z=[]);var ua=U.view.getCellStates(W.getChildCells(this.state.cell,!0));if(0<ua.length){var Da=W.getChildCells(ua[0].cell,!0),Fa=
-U.getTableLines(this.state.cell,!1,!0),Ma=U.getTableLines(this.state.cell,!0,!1);for(W=0;W<ua.length;W++)mxUtils.bind(this,function(Qa){var Ba=ua[Qa],Ka=Qa<ua.length-1?ua[Qa+1]:null;Ka=null!=Ka?U.getCellGeometry(Ka.cell):null;var Oa=null!=Ka&&null!=Ka.alternateBounds?Ka.alternateBounds:Ka;Ka=null!=Ma[Qa]?new aa(Ma[Qa],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Ka.isDashed=xa.isDashed;Ka.svgStrokeTolerance++;Ba=new mxHandle(Ba,"row-resize",null,Ka);Ba.tableHandle=!0;var Ya=
-0;Ba.shape.node.parentNode.insertBefore(Ba.shape.node,Ba.shape.node.parentNode.firstChild);Ba.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Ya?mxConstants.NONE:xa.stroke;if(this.shape.constructor==aa)this.shape.line=J(Ma[Qa],0,Ya),this.shape.updateBoundsFromLine();else{var eb=U.getActualStartSize(ka.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+Ya*ea;this.shape.bounds.x=ka.x+(Qa==ua.length-1?0:eb.x*ea);this.shape.bounds.width=ka.width-(Qa==ua.length-
-1?0:eb.width+eb.x+ea)}this.shape.redraw()}};var db=!1;Ba.setPosition=function(eb,cb,ub){Ya=Math.max(Graph.minTableRowHeight-eb.height,cb.y-eb.y-eb.height);db=mxEvent.isShiftDown(ub.getEvent());null!=Oa&&db&&(Ya=Math.min(Ya,Oa.height-Graph.minTableRowHeight))};Ba.execute=function(eb){if(0!=Ya)U.setTableRowHeight(this.state.cell,Ya,!db);else if(!O.blockDelayedSelection){var cb=U.getCellAt(eb.getGraphX(),eb.getGraphY())||ka.cell;U.graphHandler.selectCellForEvent(cb,eb)}Ya=0};Ba.reset=function(){Ya=0};
-z.push(Ba)})(W);for(W=0;W<Da.length;W++)mxUtils.bind(this,function(Qa){var Ba=U.view.getState(Da[Qa]),Ka=U.getCellGeometry(Da[Qa]),Oa=null!=Ka.alternateBounds?Ka.alternateBounds:Ka;null==Ba&&(Ba=new mxCellState(U.view,Da[Qa],U.getCellStyle(Da[Qa])),Ba.x=ka.x+Ka.x*ea,Ba.y=ka.y+Ka.y*ea,Ba.width=Oa.width*ea,Ba.height=Oa.height*ea,Ba.updateCachedBounds());Ka=Qa<Da.length-1?Da[Qa+1]:null;Ka=null!=Ka?U.getCellGeometry(Ka):null;var Ya=null!=Ka&&null!=Ka.alternateBounds?Ka.alternateBounds:Ka;Ka=null!=Fa[Qa]?
-new aa(Fa[Qa],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);Ka.isDashed=xa.isDashed;Ka.svgStrokeTolerance++;Ba=new mxHandle(Ba,"col-resize",null,Ka);Ba.tableHandle=!0;var db=0;Ba.shape.node.parentNode.insertBefore(Ba.shape.node,Ba.shape.node.parentNode.firstChild);Ba.redraw=function(){if(null!=this.shape){this.shape.stroke=0==db?mxConstants.NONE:xa.stroke;if(this.shape.constructor==aa)this.shape.line=J(Fa[Qa],db,0),this.shape.updateBoundsFromLine();else{var cb=U.getActualStartSize(ka.cell,
-!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(Oa.width+db)*ea;this.shape.bounds.y=ka.y+(Qa==Da.length-1?0:cb.y*ea);this.shape.bounds.height=ka.height-(Qa==Da.length-1?0:(cb.height+cb.y)*ea)}this.shape.redraw()}};var eb=!1;Ba.setPosition=function(cb,ub,fb){db=Math.max(Graph.minTableColumnWidth-Oa.width,ub.x-cb.x-Oa.width);eb=mxEvent.isShiftDown(fb.getEvent());null==Ya||eb||(db=Math.min(db,Ya.width-Graph.minTableColumnWidth))};Ba.execute=function(cb){if(0!=db)U.setTableColumnWidth(this.state.cell,
-db,eb);else if(!O.blockDelayedSelection){var ub=U.getCellAt(cb.getGraphX(),cb.getGraphY())||ka.cell;U.graphHandler.selectCellForEvent(ub,cb)}db=0};Ba.positionChanged=function(){};Ba.reset=function(){db=0};z.push(Ba)})(W)}}return null!=z?z.reverse():null};var ha=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(z){ha.apply(this,arguments);if(null!=this.moveHandles)for(var J=0;J<this.moveHandles.length;J++)this.moveHandles[J].style.visibility=z?"":"hidden";
-if(null!=this.cornerHandles)for(J=0;J<this.cornerHandles.length;J++)this.cornerHandles[J].node.style.visibility=z?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var z=this.graph.model;if(null!=this.moveHandles){for(var J=0;J<this.moveHandles.length;J++)this.moveHandles[J].parentNode.removeChild(this.moveHandles[J]);this.moveHandles=null}this.moveHandles=[];for(J=0;J<z.getChildCount(this.state.cell);J++)mxUtils.bind(this,function(O){if(null!=O&&z.isVertex(O.cell)){var U=mxUtils.createImage(Editor.rowMoveImage);
-U.style.position="absolute";U.style.cursor="pointer";U.style.width="7px";U.style.height="4px";U.style.padding="4px 2px 4px 2px";U.rowState=O;mxEvent.addGestureListeners(U,mxUtils.bind(this,function(W){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(W)&&this.graph.isCellSelected(O.cell)||this.graph.selectCellForEvent(O.cell,W);mxEvent.isPopupTrigger(W)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(W),mxEvent.getClientY(W),this.graph.getSelectionCells()),
-this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(W),this.graph.isMouseDown=!0);mxEvent.consume(W)}),null,mxUtils.bind(this,function(W){mxEvent.isPopupTrigger(W)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(W),mxEvent.getClientY(W),O.cell,W),mxEvent.consume(W))}));this.moveHandles.push(U);this.graph.container.appendChild(U)}})(this.graph.view.getState(z.getChildAt(this.state.cell,J)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var z=
-0;z<this.customHandles.length;z++)this.customHandles[z].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var X=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var z=new mxPoint(0,0),J=this.tolerance,O=this.state.style.shape;null==mxCellRenderer.defaultShapes[O]&&mxStencilRegistry.getStencil(O);O=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;
-if(!O&&null!=this.customHandles)for(var U=0;U<this.customHandles.length;U++)if(null!=this.customHandles[U].shape&&null!=this.customHandles[U].shape.bounds){var W=this.customHandles[U].shape.bounds,ea=W.getCenterX(),ka=W.getCenterY();if(Math.abs(this.state.x-ea)<W.width/2||Math.abs(this.state.y-ka)<W.height/2||Math.abs(this.state.x+this.state.width-ea)<W.width/2||Math.abs(this.state.y+this.state.height-ka)<W.height/2){O=!0;break}}O&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(J/=
-2,this.graph.isTable(this.state.cell)&&(J+=7),z.x=this.sizers[0].bounds.width+J,z.y=this.sizers[0].bounds.height+J):z=X.apply(this,arguments);return z};mxVertexHandler.prototype.updateHint=function(z){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{z=this.state.view.scale;var J=this.state.view.unit;this.hint.innerHTML=e(this.roundLength(this.bounds.width/
-z),J)+" x "+e(this.roundLength(this.bounds.height/z),J)}z=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==z&&(z=this.bounds);this.hint.style.left=z.x+Math.round((z.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=z.y+z.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 ia=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(z,J){ia.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var q=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(z,J){q.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display=
-"")};mxEdgeHandler.prototype.updateHint=function(z,J){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var O=this.graph.view.translate,U=this.graph.view.scale,W=this.roundLength(J.x/U-O.x);O=this.roundLength(J.y/U-O.y);U=this.graph.view.unit;this.hint.innerHTML=e(W,U)+", "+e(O,U);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(W=this.constraintHandler.currentConstraint.point,
-this.hint.innerHTML="["+Math.round(100*W.x)+"%, "+Math.round(100*W.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(z.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(z.getGraphY(),J.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"/>');
+!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(x){return!mxEvent.isAltDown(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 l=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(x){return l.apply(this,arguments)||
+this.graph.isEdgeIgnored(x)};var D=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(x){return this.graph.isCloneEvent(x)!=D.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 H in this.graph.currentEdgeStyle)x.style[H]=this.graph.currentEdgeStyle[H];x.style=this.graph.postProcessCellStyle(x.cell,x.style);return x};var p=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var x=p.apply(this,arguments);x.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];
+return x};mxConnectionHandler.prototype.updatePreview=function(x){};var E=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var x=E.apply(this,arguments),H=x.getCell;x.getCell=mxUtils.bind(this,function(P){var X=H.apply(this,arguments);this.error=null;return X});return x};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=
+function(){for(var x="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",H="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),P=0;P<H.length;P++)null!=this.currentEdgeStyle[H[P]]&&(x+=H[P]+"="+this.currentEdgeStyle[H[P]]+";");null!=this.currentEdgeStyle.orthogonalLoop?x+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&
+(x+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?x+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(x+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(x+="elbow="+this.currentEdgeStyle.elbow+";");return x=null!=this.currentEdgeStyle.html?x+("html="+this.currentEdgeStyle.html+";"):x+"html=1;"};
+Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var x=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=x&&(new mxCodec(x.ownerDocument)).decode(x,this.getStylesheet())};Graph.prototype.createCellLookup=function(x,H){H=null!=H?H:{};for(var P=0;P<x.length;P++){var X=x[P];H[mxObjectIdentity.get(X)]=X.getId();for(var Z=this.model.getChildCount(X),
+fa=0;fa<Z;fa++)this.createCellLookup([this.model.getChildAt(X,fa)],H)}return H};Graph.prototype.createCellMapping=function(x,H,P){P=null!=P?P:{};for(var X in x){var Z=H[X];null==P[Z]&&(P[Z]=x[X].getId()||"")}return P};Graph.prototype.importGraphModel=function(x,H,P,X){H=null!=H?H:0;P=null!=P?P:0;var Z=new mxCodec(x.ownerDocument),fa=new mxGraphModel;Z.decode(x,fa);x=[];Z={};var la={},za=fa.getChildren(this.cloneCell(fa.root,this.isCloneInvalidEdges(),Z));if(null!=za){var ua=this.createCellLookup([fa.root]);
+za=za.slice();this.model.beginUpdate();try{if(1!=za.length||this.isCellLocked(this.getDefaultParent()))for(fa=0;fa<za.length;fa++)oa=this.model.getChildren(this.moveCells([za[fa]],H,P,!1,this.model.getRoot())[0]),null!=oa&&(x=x.concat(oa));else{var oa=fa.getChildren(za[0]);null!=oa&&(x=this.moveCells(oa,H,P,!1,this.getDefaultParent()),la[fa.getChildAt(fa.root,0).getId()]=this.getDefaultParent().getId())}if(null!=x&&(this.createCellMapping(Z,ua,la),this.updateCustomLinks(la,x),X)){this.isGridEnabled()&&
+(H=this.snap(H),P=this.snap(P));var ta=this.getBoundingBoxFromGeometry(x,!0);null!=ta&&this.moveCells(x,H-ta.x,P-ta.y)}}finally{this.model.endUpdate()}}return x};Graph.prototype.encodeCells=function(x){for(var H={},P=this.cloneCells(x,null,H),X=new mxDictionary,Z=0;Z<x.length;Z++)X.put(x[Z],!0);var fa=new mxCodec,la=new mxGraphModel,za=la.getChildAt(la.getRoot(),0);for(Z=0;Z<P.length;Z++){la.add(za,P[Z]);var ua=this.view.getState(x[Z]);if(null!=ua){var oa=this.getCellGeometry(P[Z]);null!=oa&&oa.relative&&
+!this.model.isEdge(x[Z])&&null==X.get(this.model.getParent(x[Z]))&&(oa.offset=null,oa.relative=!1,oa.x=ua.x/ua.view.scale-ua.view.translate.x,oa.y=ua.y/ua.view.scale-ua.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(H,this.createCellLookup(x)),P);return fa.encode(la)};Graph.prototype.isSwimlane=function(x,H){var P=null;null==x||this.model.isEdge(x)||this.model.getParent(x)==this.model.getRoot()||(P=this.getCurrentCellStyle(x,H)[mxConstants.STYLE_SHAPE]);return P==mxConstants.SHAPE_SWIMLANE||
+"table"==P||"tableRow"==P};var N=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(x){var H=this.model.getParent(x);if(null!=H){var P=this.getCurrentCellStyle(H);if(null!=P.expand)return"0"!=P.expand}return N.apply(this,arguments)&&(null==H||!this.isTable(H))};var R=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(x,H,P,X,Z,fa,la,za){null==za&&(za=this.model.getParent(x),this.isTable(za)||this.isTableRow(za))&&(za=this.getCellAt(fa,la,null,!0,!1));P=null;this.model.beginUpdate();
+try{P=R.apply(this,[x,H,P,X,Z,fa,la,za]);this.model.setValue(P,"");var ua=this.getChildCells(P,!0);for(H=0;H<ua.length;H++){var oa=this.getCellGeometry(ua[H]);null!=oa&&oa.relative&&0<oa.x&&this.model.remove(ua[H])}var ta=this.getChildCells(x,!0);for(H=0;H<ta.length;H++)oa=this.getCellGeometry(ta[H]),null!=oa&&oa.relative&&0>=oa.x&&this.model.remove(ta[H]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[P]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[P]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
+null,[x]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[x]);var Ea=this.model.getTerminal(P,!1);if(null!=Ea){var Fa=this.getCurrentCellStyle(Ea);null!=Fa&&"1"==Fa.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[x]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[x]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[P]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[P]))}}finally{this.model.endUpdate()}return P};var G=Graph.prototype.selectCell;Graph.prototype.selectCell=
+function(x,H,P){if(H||P)G.apply(this,arguments);else{var X=this.getSelectionCell(),Z=null,fa=[],la=mxUtils.bind(this,function(za){if(null!=this.view.getState(za)&&(this.model.isVertex(za)||this.model.isEdge(za)))if(fa.push(za),za==X)Z=fa.length-1;else if(x&&null==X&&0<fa.length||null!=Z&&x&&fa.length>Z||!x&&0<Z)return;for(var ua=0;ua<this.model.getChildCount(za);ua++)la(this.model.getChildAt(za,ua))});la(this.model.root);0<fa.length&&(Z=null!=Z?mxUtils.mod(Z+(x?1:-1),fa.length):0,this.setSelectionCell(fa[Z]))}};
+Graph.prototype.swapShapes=function(x,H,P,X,Z,fa,la){H=!1;if(!X&&null!=Z&&1==x.length&&(X=this.view.getState(Z),P=this.view.getState(x[0]),null!=X&&null!=P&&(null!=fa&&mxEvent.isShiftDown(fa)||"umlLifeline"==X.style.shape&&"umlLifeline"==P.style.shape)&&(X=this.getCellGeometry(Z),fa=this.getCellGeometry(x[0]),null!=X&&null!=fa))){H=X.clone();X=fa.clone();X.x=H.x;X.y=H.y;H.x=fa.x;H.y=fa.y;this.model.beginUpdate();try{this.model.setGeometry(Z,H),this.model.setGeometry(x[0],X)}finally{this.model.endUpdate()}H=
+!0}return H};var M=Graph.prototype.moveCells;Graph.prototype.moveCells=function(x,H,P,X,Z,fa,la){if(this.swapShapes(x,H,P,X,Z,fa,la))return x;la=null!=la?la:{};if(this.isTable(Z)){for(var za=[],ua=0;ua<x.length;ua++)this.isTable(x[ua])?za=za.concat(this.model.getChildCells(x[ua],!0).reverse()):za.push(x[ua]);x=za}this.model.beginUpdate();try{za=[];for(ua=0;ua<x.length;ua++)if(null!=Z&&this.isTableRow(x[ua])){var oa=this.model.getParent(x[ua]),ta=this.getCellGeometry(x[ua]);this.isTable(oa)&&za.push(oa);
+if(null!=oa&&null!=ta&&this.isTable(oa)&&this.isTable(Z)&&(X||oa!=Z)){if(!X){var Ea=this.getCellGeometry(oa);null!=Ea&&(Ea=Ea.clone(),Ea.height-=ta.height,this.model.setGeometry(oa,Ea))}Ea=this.getCellGeometry(Z);null!=Ea&&(Ea=Ea.clone(),Ea.height+=ta.height,this.model.setGeometry(Z,Ea));var Fa=this.model.getChildCells(Z,!0);if(0<Fa.length){x[ua]=X?this.cloneCell(x[ua]):x[ua];var Pa=this.model.getChildCells(x[ua],!0),Ra=this.model.getChildCells(Fa[0],!0),Ca=Ra.length-Pa.length;if(0<Ca)for(var Ja=
+0;Ja<Ca;Ja++){var Qa=this.cloneCell(Pa[Pa.length-1]);null!=Qa&&(Qa.value="",this.model.add(x[ua],Qa))}else if(0>Ca)for(Ja=0;Ja>Ca;Ja--)this.model.remove(Pa[Pa.length+Ja-1]);Pa=this.model.getChildCells(x[ua],!0);for(Ja=0;Ja<Ra.length;Ja++){var $a=this.getCellGeometry(Ra[Ja]),eb=this.getCellGeometry(Pa[Ja]);null!=$a&&null!=eb&&(eb=eb.clone(),eb.width=$a.width,this.model.setGeometry(Pa[Ja],eb))}}}}var cb=M.apply(this,arguments);for(ua=0;ua<za.length;ua++)!X&&this.model.contains(za[ua])&&0==this.model.getChildCount(za[ua])&&
+this.model.remove(za[ua]);X&&this.updateCustomLinks(this.createCellMapping(la,this.createCellLookup(x)),cb)}finally{this.model.endUpdate()}return cb};var Q=Graph.prototype.removeCells;Graph.prototype.removeCells=function(x,H){var P=[];this.model.beginUpdate();try{for(var X=0;X<x.length;X++)if(this.isTableCell(x[X])){var Z=this.model.getParent(x[X]),fa=this.model.getParent(Z);1==this.model.getChildCount(Z)&&1==this.model.getChildCount(fa)?0>mxUtils.indexOf(x,fa)&&0>mxUtils.indexOf(P,fa)&&P.push(fa):
+this.labelChanged(x[X],"")}else{if(this.isTableRow(x[X])&&(fa=this.model.getParent(x[X]),0>mxUtils.indexOf(x,fa)&&0>mxUtils.indexOf(P,fa))){for(var la=this.model.getChildCells(fa,!0),za=0,ua=0;ua<la.length;ua++)0<=mxUtils.indexOf(x,la[ua])&&za++;za==la.length&&P.push(fa)}P.push(x[X])}P=Q.apply(this,[P,H])}finally{this.model.endUpdate()}return P};Graph.prototype.updateCustomLinks=function(x,H,P){P=null!=P?P:new Graph;for(var X=0;X<H.length;X++)null!=H[X]&&P.updateCustomLinksForCell(x,H[X],P)};Graph.prototype.updateCustomLinksForCell=
+function(x,H){this.doUpdateCustomLinksForCell(x,H);for(var P=this.model.getChildCount(H),X=0;X<P;X++)this.updateCustomLinksForCell(x,this.model.getChildAt(H,X))};Graph.prototype.doUpdateCustomLinksForCell=function(x,H){};Graph.prototype.getAllConnectionConstraints=function(x,H){if(null!=x){H=mxUtils.getValue(x.style,"points",null);if(null!=H){x=[];try{var P=JSON.parse(H);for(H=0;H<P.length;H++){var X=P[H];x.push(new mxConnectionConstraint(new mxPoint(X[0],X[1]),2<X.length?"0"!=X[2]:!0,null,3<X.length?
+X[3]:0,4<X.length?X[4]:0))}}catch(fa){}return x}if(null!=x.shape&&null!=x.shape.bounds){X=x.shape.direction;H=x.shape.bounds;var Z=x.shape.scale;P=H.width/Z;H=H.height/Z;if(X==mxConstants.DIRECTION_NORTH||X==mxConstants.DIRECTION_SOUTH)X=P,P=H,H=X;H=x.shape.getConstraints(x.style,P,H);if(null!=H)return H;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 H=this.getCurrentCellStyle(x);H=mxUtils.getValue(H,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,H,[x])}};Graph.prototype.isValidRoot=function(x){for(var H=this.model.getChildCount(x),P=0,X=0;X<H;X++){var Z=this.model.getChildAt(x,X);this.model.isVertex(Z)&&(Z=this.getCellGeometry(Z),null==Z||Z.relative||P++)}return 0<P||this.isContainer(x)};Graph.prototype.isValidDropTarget=
+function(x,H,P){for(var X=this.getCurrentCellStyle(x),Z=!0,fa=!0,la=0;la<H.length&&fa;la++)Z=Z&&this.isTable(H[la]),fa=fa&&this.isTableRow(H[la]);return(1==H.length&&null!=P&&mxEvent.isShiftDown(P)&&!mxEvent.isControlDown(P)&&!mxEvent.isAltDown(P)||("1"!=mxUtils.getValue(X,"part","0")||this.isContainer(x))&&"0"!=mxUtils.getValue(X,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(x))&&!this.isTableRow(x)&&(!this.isTable(x)||fa||Z))&&!this.isCellLocked(x)};
+Graph.prototype.createGroupCell=function(){var x=mxGraph.prototype.createGroupCell.apply(this,arguments);x.setStyle("group");return x};Graph.prototype.isExtendParentsOnAdd=function(x){var H=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(H&&null!=x&&null!=this.layoutManager){var P=this.model.getParent(x);null!=P&&(P=this.layoutManager.getLayout(P),null!=P&&P.constructor==mxStackLayout&&(H=!1))}return H};Graph.prototype.getPreferredSizeForCell=function(x){var H=mxGraph.prototype.getPreferredSizeForCell.apply(this,
+arguments);null!=H&&(H.width+=10,H.height+=4,this.gridEnabled&&(H.width=this.snap(H.width),H.height=this.snap(H.height)));return H};Graph.prototype.turnShapes=function(x,H){var P=this.getModel(),X=[];P.beginUpdate();try{for(var Z=0;Z<x.length;Z++){var fa=x[Z];if(P.isEdge(fa)){var la=P.getTerminal(fa,!0),za=P.getTerminal(fa,!1);P.setTerminal(fa,za,!0);P.setTerminal(fa,la,!1);var ua=P.getGeometry(fa);if(null!=ua){ua=ua.clone();null!=ua.points&&ua.points.reverse();var oa=ua.getTerminalPoint(!0),ta=ua.getTerminalPoint(!1);
+ua.setTerminalPoint(oa,!1);ua.setTerminalPoint(ta,!0);P.setGeometry(fa,ua);var Ea=this.view.getState(fa),Fa=this.view.getState(la),Pa=this.view.getState(za);if(null!=Ea){var Ra=null!=Fa?this.getConnectionConstraint(Ea,Fa,!0):null,Ca=null!=Pa?this.getConnectionConstraint(Ea,Pa,!1):null;this.setConnectionConstraint(fa,la,!0,Ca);this.setConnectionConstraint(fa,za,!1,Ra);var Ja=mxUtils.getValue(Ea.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
+mxUtils.getValue(Ea.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[fa]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Ja,[fa])}X.push(fa)}}else if(P.isVertex(fa)&&(ua=this.getCellGeometry(fa),null!=ua)){if(!(this.isTable(fa)||this.isTableRow(fa)||this.isTableCell(fa)||this.isSwimlane(fa))){ua=ua.clone();ua.x+=ua.width/2-ua.height/2;ua.y+=ua.height/2-ua.width/2;var Qa=ua.width;ua.width=ua.height;ua.height=Qa;P.setGeometry(fa,ua)}var $a=this.view.getState(fa);if(null!=$a){var eb=
+[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],cb=mxUtils.getValue($a.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,eb[mxUtils.mod(mxUtils.indexOf(eb,cb)+(H?-1:1),eb.length)],[fa])}X.push(fa)}}}finally{P.endUpdate()}return X};Graph.prototype.stencilHasPlaceholders=function(x){if(null!=x&&null!=x.fgNode)for(x=x.fgNode.firstChild;null!=x;){if("text"==x.nodeName&&"1"==x.getAttribute("placeholders"))return!0;
+x=x.nextSibling}return!1};var e=Graph.prototype.processChange;Graph.prototype.processChange=function(x){if(x instanceof mxGeometryChange&&(this.isTableCell(x.cell)||this.isTableRow(x.cell))&&(null==x.previous&&null!=x.geometry||null!=x.previous&&!x.previous.equals(x.geometry))){var H=x.cell;this.isTableCell(H)&&(H=this.model.getParent(H));this.isTableRow(H)&&(H=this.model.getParent(H));var P=this.view.getState(H);null!=P&&null!=P.shape&&(this.view.invalidate(H),P.shape.bounds=null)}e.apply(this,arguments);
+x instanceof mxValueChange&&null!=x.cell&&null!=x.cell.value&&"object"==typeof x.cell.value&&this.invalidateDescendantsWithPlaceholders(x.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(x){x=this.model.getDescendants(x);if(0<x.length)for(var H=0;H<x.length;H++){var P=this.view.getState(x[H]);null!=P&&null!=P.shape&&null!=P.shape.stencil&&this.stencilHasPlaceholders(P.shape.stencil)?this.removeStateForCell(x[H]):this.isReplacePlaceholders(x[H])&&this.view.invalidate(x[H],!1,!1)}};
+Graph.prototype.replaceElement=function(x,H){H=x.ownerDocument.createElement(null!=H?H:"span");for(var P=Array.prototype.slice.call(x.attributes);attr=P.pop();)H.setAttribute(attr.nodeName,attr.nodeValue);H.innerHTML=x.innerHTML;x.parentNode.replaceChild(H,x)};Graph.prototype.processElements=function(x,H){if(null!=x){x=x.getElementsByTagName("*");for(var P=0;P<x.length;P++)H(x[P])}};Graph.prototype.updateLabelElements=function(x,H,P){x=null!=x?x:this.getSelectionCells();for(var X=document.createElement("div"),
+Z=0;Z<x.length;Z++)if(this.isHtmlLabel(x[Z])){var fa=this.convertValueToString(x[Z]);if(null!=fa&&0<fa.length){X.innerHTML=fa;for(var la=X.getElementsByTagName(null!=P?P:"*"),za=0;za<la.length;za++)H(la[za]);X.innerHTML!=fa&&this.cellLabelChanged(x[Z],X.innerHTML)}}};Graph.prototype.cellLabelChanged=function(x,H,P){H=Graph.zapGremlins(H);this.model.beginUpdate();try{if(null!=x.value&&"object"==typeof x.value){if(this.isReplacePlaceholders(x)&&null!=x.getAttribute("placeholder"))for(var X=x.getAttribute("placeholder"),
+Z=x;null!=Z;){if(Z==this.model.getRoot()||null!=Z.value&&"object"==typeof Z.value&&Z.hasAttribute(X)){this.setAttributeForCell(Z,X,H);break}Z=this.model.getParent(Z)}var fa=x.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&fa.hasAttribute("label_"+Graph.diagramLanguage)?fa.setAttribute("label_"+Graph.diagramLanguage,H):fa.setAttribute("label",H);H=fa}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(x){if(null!=
+x){for(var H=new mxDictionary,P=0;P<x.length;P++)H.put(x[P],!0);var X=[];for(P=0;P<x.length;P++){var Z=this.model.getParent(x[P]);null==Z||H.get(Z)||(H.put(Z,!0),X.push(Z))}for(P=0;P<X.length;P++)if(Z=this.view.getState(X[P]),null!=Z&&(this.model.isEdge(Z.cell)||this.model.isVertex(Z.cell))&&this.isCellDeletable(Z.cell)&&this.isTransparentState(Z)){for(var fa=!0,la=0;la<this.model.getChildCount(Z.cell)&&fa;la++)H.get(this.model.getChildAt(Z.cell,la))||(fa=!1);fa&&x.push(Z.cell)}}mxGraph.prototype.cellsRemoved.apply(this,
+arguments)};Graph.prototype.removeCellsAfterUngroup=function(x){for(var H=[],P=0;P<x.length;P++)this.isCellDeletable(x[P])&&this.isTransparentState(this.view.getState(x[P]))&&H.push(x[P]);x=H;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(x,H){this.setAttributeForCell(x,"link",H)};Graph.prototype.setTooltipForCell=function(x,H){var P="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(x.value)&&x.value.hasAttribute("tooltip_"+
+Graph.diagramLanguage)&&(P="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(x,P,H)};Graph.prototype.getAttributeForCell=function(x,H,P){x=null!=x.value&&"object"===typeof x.value?x.value.getAttribute(H):null;return null!=x?x:P};Graph.prototype.setAttributeForCell=function(x,H,P){if(null!=x.value&&"object"==typeof x.value)var X=x.value.cloneNode(!0);else X=mxUtils.createXmlDocument().createElement("UserObject"),X.setAttribute("label",x.value||"");null!=P?X.setAttribute(H,P):X.removeAttribute(H);
+this.model.setValue(x,X)};var f=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(x,H,P,X){this.getModel();if(mxEvent.isAltDown(H))return null;for(var Z=0;Z<x.length;Z++){var fa=this.model.getParent(x[Z]);if(this.model.isEdge(fa)&&0>mxUtils.indexOf(x,fa))return null}fa=f.apply(this,arguments);var la=!0;for(Z=0;Z<x.length&&la;Z++)la=la&&this.isTableRow(x[Z]);la&&(this.isTableCell(fa)&&(fa=this.model.getParent(fa)),this.isTableRow(fa)&&(fa=this.model.getParent(fa)),this.isTable(fa)||
+(fa=null));return fa};Graph.prototype.click=function(x){mxGraph.prototype.click.call(this,x);this.firstClickState=x.getState();this.firstClickSource=x.getSource()};Graph.prototype.dblClick=function(x,H){this.isEnabled()&&(H=this.insertTextForEvent(x,H),mxGraph.prototype.dblClick.call(this,x,H))};Graph.prototype.insertTextForEvent=function(x,H){var P=mxUtils.convertPoint(this.container,mxEvent.getClientX(x),mxEvent.getClientY(x));if(null!=x&&!this.model.isVertex(H)){var X=this.model.isEdge(H)?this.view.getState(H):
+null,Z=mxEvent.getSource(x);this.firstClickState!=X||this.firstClickSource!=Z||null!=X&&null!=X.text&&null!=X.text.node&&null!=X.text.boundingBox&&(mxUtils.contains(X.text.boundingBox,P.x,P.y)||mxUtils.isAncestorNode(X.text.node,mxEvent.getSource(x)))||(null!=X||this.isCellLocked(this.getDefaultParent()))&&(null==X||this.isCellLocked(X.cell))||!(null!=X||mxClient.IS_SVG&&Z==this.view.getCanvas().ownerSVGElement)||(null==X&&(X=this.view.getState(this.getCellAt(P.x,P.y))),H=this.addText(P.x,P.y,X))}return H};
+Graph.prototype.getInsertPoint=function(){var x=this.getGridSize(),H=this.container.scrollLeft/this.view.scale-this.view.translate.x,P=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var X=this.getPageLayout(),Z=this.getPageSize();H=Math.max(H,X.x*Z.width);P=Math.max(P,X.y*Z.height)}return new mxPoint(this.snap(H+x),this.snap(P+x))};Graph.prototype.getFreeInsertPoint=function(){var x=this.view,H=this.getGraphBounds(),P=this.getInsertPoint(),X=this.snap(Math.round(Math.max(P.x,
+H.x/x.scale-x.translate.x+(0==H.width?2*this.gridSize:0))));x=this.snap(Math.round(Math.max(P.y,(H.y+H.height)/x.scale-x.translate.y+2*this.gridSize)));return new mxPoint(X,x)};Graph.prototype.getCenterInsertPoint=function(x){x=null!=x?x:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-x.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/
+2)/this.view.scale-this.view.translate.y-x.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-x.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-x.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(x,H,P){var X=new mxCell;X.value="Text";X.geometry=new mxGeometry(0,0,0,0);X.vertex=!0;if(null!=P&&this.model.isEdge(P.cell)){X.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";
+X.geometry.relative=!0;X.connectable=!1;var Z=this.view.getRelativePoint(P,x,H);X.geometry.x=Math.round(1E4*Z.x)/1E4;X.geometry.y=Math.round(Z.y);X.geometry.offset=new mxPoint(0,0);Z=this.view.getPoint(P,X.geometry);var fa=this.view.scale;X.geometry.offset=new mxPoint(Math.round((x-Z.x)/fa),Math.round((H-Z.y)/fa))}else Z=this.view.translate,X.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",X.geometry.width=40,X.geometry.height=20,X.geometry.x=Math.round(x/this.view.scale)-
+Z.x-(null!=P?P.origin.x:0),X.geometry.y=Math.round(H/this.view.scale)-Z.y-(null!=P?P.origin.y:0),X.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([X],null!=P?P.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[X])),this.autoSizeCell(X)}finally{this.getModel().endUpdate()}return X};Graph.prototype.addClickHandler=function(x,H,P){var X=mxUtils.bind(this,function(){var ua=this.container.getElementsByTagName("a");if(null!=ua)for(var oa=0;oa<ua.length;oa++){var ta=
+this.getAbsoluteUrl(ua[oa].getAttribute("href"));null!=ta&&(ua[oa].setAttribute("rel",this.linkRelation),ua[oa].setAttribute("href",ta),null!=H&&mxEvent.addGestureListeners(ua[oa],null,null,H))}});this.model.addListener(mxEvent.CHANGE,X);X();var Z=this.container.style.cursor,fa=this.getTolerance(),la=this,za={currentState:null,currentLink:null,currentTarget:null,highlight:null!=x&&""!=x&&x!=mxConstants.NONE?new mxCellHighlight(la,x,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(ua){var oa=
+ua.sourceState;if(null==oa||null==la.getLinkForCell(oa.cell))ua=la.getCellAt(ua.getGraphX(),ua.getGraphY(),null,null,null,function(ta,Ea,Fa){return null==la.getLinkForCell(ta.cell)}),oa=null==oa||la.model.isAncestor(ua,oa.cell)?la.view.getState(ua):null;oa!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=oa,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(ua,oa){this.startX=oa.getGraphX();this.startY=oa.getGraphY();this.scrollLeft=la.container.scrollLeft;
+this.scrollTop=la.container.scrollTop;null==this.currentLink&&"auto"==la.container.style.overflow&&(la.container.style.cursor="move");this.updateCurrentState(oa)},mouseMove:function(ua,oa){if(la.isMouseDown)null!=this.currentLink&&(ua=Math.abs(this.startX-oa.getGraphX()),oa=Math.abs(this.startY-oa.getGraphY()),(ua>fa||oa>fa)&&this.clear());else{for(ua=oa.getSource();null!=ua&&"a"!=ua.nodeName.toLowerCase();)ua=ua.parentNode;null!=ua?this.clear():(null!=la.tooltipHandler&&null!=this.currentLink&&null!=
+this.currentState&&la.tooltipHandler.reset(oa,!0,this.currentState),(null==this.currentState||oa.getState()!=this.currentState&&null!=oa.sourceState||!la.intersects(this.currentState,oa.getGraphX(),oa.getGraphY()))&&this.updateCurrentState(oa))}},mouseUp:function(ua,oa){var ta=oa.getSource();for(ua=oa.getEvent();null!=ta&&"a"!=ta.nodeName.toLowerCase();)ta=ta.parentNode;null==ta&&Math.abs(this.scrollLeft-la.container.scrollLeft)<fa&&Math.abs(this.scrollTop-la.container.scrollTop)<fa&&(null==oa.sourceState||
+!oa.isSource(oa.sourceState.control))&&((mxEvent.isLeftMouseButton(ua)||mxEvent.isMiddleMouseButton(ua))&&!mxEvent.isPopupTrigger(ua)||mxEvent.isTouchEvent(ua))&&(null!=this.currentLink?(ta=la.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&ta||null==H||H(ua,this.currentLink),mxEvent.isConsumed(ua)||(ua=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(ua)?"_blank":ta?la.linkTarget:"_top",la.openLink(this.currentLink,ua),oa.consume())):null!=P&&!oa.isConsumed()&&
+Math.abs(this.scrollLeft-la.container.scrollLeft)<fa&&Math.abs(this.scrollTop-la.container.scrollTop)<fa&&Math.abs(this.startX-oa.getGraphX())<fa&&Math.abs(this.startY-oa.getGraphY())<fa&&P(oa.getEvent()));this.clear()},activate:function(ua){this.currentLink=la.getAbsoluteUrl(la.getLinkForCell(ua.cell));null!=this.currentLink&&(this.currentTarget=la.getLinkTargetForCell(ua.cell),la.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(ua))},clear:function(){null!=la.container&&
+(la.container.style.cursor=Z);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=la.tooltipHandler&&la.tooltipHandler.hide()}};la.click=function(ua){};la.addMouseListener(za);mxEvent.addListener(document,"mouseleave",function(ua){za.clear()})};Graph.prototype.duplicateCells=function(x,H){x=null!=x?x:this.getSelectionCells();H=null!=H?H:!0;for(var P=0;P<x.length;P++)this.isTableCell(x[P])&&(x[P]=this.model.getParent(x[P]));x=this.model.getTopmostCells(x);
+var X=this.getModel(),Z=this.gridSize,fa=[];X.beginUpdate();try{var la={},za=this.createCellLookup(x),ua=this.cloneCells(x,!1,la,!0);for(P=0;P<x.length;P++){var oa=X.getParent(x[P]);if(null!=oa){var ta=this.moveCells([ua[P]],Z,Z,!1)[0];fa.push(ta);if(H)X.add(oa,ua[P]);else{var Ea=oa.getIndex(x[P]);X.add(oa,ua[P],Ea+1)}if(this.isTable(oa)){var Fa=this.getCellGeometry(ua[P]),Pa=this.getCellGeometry(oa);null!=Fa&&null!=Pa&&(Pa=Pa.clone(),Pa.height+=Fa.height,X.setGeometry(oa,Pa))}}else fa.push(ua[P])}this.updateCustomLinks(this.createCellMapping(la,
+za),ua,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",ua))}finally{X.endUpdate()}return fa};Graph.prototype.insertImage=function(x,H,P){if(null!=x&&null!=this.cellEditor.textarea){for(var X=this.cellEditor.textarea.getElementsByTagName("img"),Z=[],fa=0;fa<X.length;fa++)Z.push(X[fa]);document.execCommand("insertimage",!1,x);x=this.cellEditor.textarea.getElementsByTagName("img");if(x.length==Z.length+1)for(fa=x.length-1;0<=fa;fa--)if(0==fa||x[fa]!=Z[fa-1]){x[fa].setAttribute("width",
+H);x[fa].setAttribute("height",P);break}}};Graph.prototype.insertLink=function(x){if(null!=this.cellEditor.textarea)if(0==x.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var H=this.cellEditor.textarea.getElementsByTagName("a"),P=[],X=0;X<H.length;X++)P.push(H[X]);document.execCommand("createlink",!1,mxUtils.trim(x));H=this.cellEditor.textarea.getElementsByTagName("a");if(H.length==P.length+1)for(X=H.length-1;0<=X;X--)if(H[X]!=P[X-1]){for(H=H[X].getElementsByTagName("a");0<H.length;){for(P=
+H[0].parentNode;null!=H[0].firstChild;)P.insertBefore(H[0].firstChild,H[0]);P.removeChild(H[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(x))};Graph.prototype.isCellResizable=function(x){var H=mxGraph.prototype.isCellResizable.apply(this,arguments),P=this.getCurrentCellStyle(x);return!this.isTableCell(x)&&!this.isTableRow(x)&&(H||"0"!=mxUtils.getValue(P,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==P[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(x,H){null==
+H&&(H=this.getSelectionCells());if(null!=H&&1<H.length){for(var P=[],X=null,Z=null,fa=0;fa<H.length;fa++)if(this.getModel().isVertex(H[fa])){var la=this.view.getState(H[fa]);if(null!=la){var za=x?la.getCenterX():la.getCenterY();X=null!=X?Math.max(X,za):za;Z=null!=Z?Math.min(Z,za):za;P.push(la)}}if(2<P.length){P.sort(function(Ea,Fa){return x?Ea.x-Fa.x:Ea.y-Fa.y});la=this.view.translate;za=this.view.scale;Z=Z/za-(x?la.x:la.y);X=X/za-(x?la.x:la.y);this.getModel().beginUpdate();try{var ua=(X-Z)/(P.length-
+1);X=Z;for(fa=1;fa<P.length-1;fa++){var oa=this.view.getState(this.model.getParent(P[fa].cell)),ta=this.getCellGeometry(P[fa].cell);X+=ua;null!=ta&&null!=oa&&(ta=ta.clone(),x?ta.x=Math.round(X-ta.width/2)-oa.origin.x:ta.y=Math.round(X-ta.height/2)-oa.origin.y,this.getModel().setGeometry(P[fa].cell,ta))}}finally{this.getModel().endUpdate()}}}return H};Graph.prototype.isCloneEvent=function(x){return mxClient.IS_MAC&&mxEvent.isMetaDown(x)||mxEvent.isControlDown(x)};Graph.prototype.createSvgImageExport=
+function(){var x=new mxImageExport;x.getLinkForCellState=mxUtils.bind(this,function(H,P){return this.getLinkForCell(H.cell)});return x};Graph.prototype.parseBackgroundImage=function(x){var H=null;null!=x&&0<x.length&&(x=JSON.parse(x),H=new mxImage(x.src,x.width,x.height));return H};Graph.prototype.getBackgroundImageObject=function(x){return x};Graph.prototype.getSvg=function(x,H,P,X,Z,fa,la,za,ua,oa,ta,Ea,Fa,Pa){var Ra=null;if(null!=Pa)for(Ra=new mxDictionary,ta=0;ta<Pa.length;ta++)Ra.put(Pa[ta],
+!0);if(Pa=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{H=null!=H?H:1;P=null!=P?P:0;Z=null!=Z?Z:!0;fa=null!=fa?fa:!0;la=null!=la?la:!0;oa=null!=oa?oa:!1;var Ca="page"==Fa?this.view.getBackgroundPageBounds():fa&&null==Ra||X||"diagram"==Fa?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),Ja=this.view.scale;"diagram"==Fa&&null!=this.backgroundImage&&(Ca=mxRectangle.fromRectangle(Ca),Ca.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*
+Ja,(this.view.translate.y+this.backgroundImage.y)*Ja,this.backgroundImage.width*Ja,this.backgroundImage.height*Ja)));if(null==Ca)throw Error(mxResources.get("drawingEmpty"));X=H/Ja;Fa=Z?-.5:0;var Qa=Graph.createSvgNode(Fa,Fa,Math.max(1,Math.ceil(Ca.width*X)+2*P)+(oa&&0==P?5:0),Math.max(1,Math.ceil(Ca.height*X)+2*P)+(oa&&0==P?5:0),x),$a=Qa.ownerDocument,eb=null!=$a.createElementNS?$a.createElementNS(mxConstants.NS_SVG,"g"):$a.createElement("g");Qa.appendChild(eb);var cb=this.createSvgCanvas(eb);cb.foOffset=
+Z?-.5:0;cb.textOffset=Z?-.5:0;cb.imageOffset=Z?-.5:0;cb.translate(Math.floor(P/H-Ca.x/Ja),Math.floor(P/H-Ca.y/Ja));var db=document.createElement("div"),rb=cb.getAlternateText;cb.getAlternateText=function(Za,fb,hb,qb,kb,ib,ub,ob,nb,wb,lb,gb,tb){if(null!=ib&&0<this.state.fontSize)try{mxUtils.isNode(ib)?ib=ib.innerText:(db.innerHTML=ib,ib=mxUtils.extractTextWithWhitespace(db.childNodes));for(var Cb=Math.ceil(2*qb/this.state.fontSize),xb=[],zb=0,pb=0;(0==Cb||zb<Cb)&&pb<ib.length;){var yb=ib.charCodeAt(pb);
+if(10==yb||13==yb){if(0<zb)break}else xb.push(ib.charAt(pb)),255>yb&&zb++;pb++}xb.length<ib.length&&1<ib.length-xb.length&&(ib=mxUtils.trim(xb.join(""))+"...");return ib}catch(Ab){return rb.apply(this,arguments)}else return rb.apply(this,arguments)};var mb=this.backgroundImage;if(null!=mb){x=Ja/H;var vb=this.view.translate;Fa=new mxRectangle((mb.x+vb.x)*x,(mb.y+vb.y)*x,mb.width*x,mb.height*x);mxUtils.intersects(Ca,Fa)&&cb.image(mb.x+vb.x,mb.y+vb.y,mb.width,mb.height,mb.src,!0)}cb.scale(X);cb.textEnabled=
+la;za=null!=za?za:this.createSvgImageExport();var Bb=za.drawCellState,Ya=za.getLinkForCellState;za.getLinkForCellState=function(Za,fb){var hb=Ya.apply(this,arguments);return null==hb||Za.view.graph.isCustomLink(hb)?null:hb};za.getLinkTargetForCellState=function(Za,fb){return Za.view.graph.getLinkTargetForCell(Za.cell)};za.drawCellState=function(Za,fb){for(var hb=Za.view.graph,qb=null!=Ra?Ra.get(Za.cell):hb.isCellSelected(Za.cell),kb=hb.model.getParent(Za.cell);!(fa&&null==Ra||qb)&&null!=kb;)qb=null!=
+Ra?Ra.get(kb):hb.isCellSelected(kb),kb=hb.model.getParent(kb);if(fa&&null==Ra||qb)hb.view.redrawEnumerationState(Za),Bb.apply(this,arguments),this.doDrawShape(Za.secondLabel,fb)};za.drawState(this.getView().getState(this.model.root),cb);this.updateSvgLinks(Qa,ua,!0);this.addForeignObjectWarning(cb,Qa);return Qa}finally{Pa&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(x,H){if("0"!=urlParams["svg-warning"]&&0<H.getElementsByTagName("foreignObject").length){var P=
+x.createElement("switch"),X=x.createElement("g");X.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var Z=x.createElement("a");Z.setAttribute("transform","translate(0,-5)");null==Z.setAttributeNS||H.ownerDocument!=document&&null==document.documentMode?(Z.setAttribute("xlink:href",Graph.foreignObjectWarningLink),Z.setAttribute("target","_blank")):(Z.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),Z.setAttributeNS(mxConstants.NS_XLINK,
+"target","_blank"));x=x.createElement("text");x.setAttribute("text-anchor","middle");x.setAttribute("font-size","10px");x.setAttribute("x","50%");x.setAttribute("y","100%");mxUtils.write(x,Graph.foreignObjectWarningText);P.appendChild(X);Z.appendChild(x);P.appendChild(Z);H.appendChild(P)}};Graph.prototype.updateSvgLinks=function(x,H,P){x=x.getElementsByTagName("a");for(var X=0;X<x.length;X++)if(null==x[X].getAttribute("target")){var Z=x[X].getAttribute("href");null==Z&&(Z=x[X].getAttribute("xlink:href"));
+null!=Z&&(null!=H&&/^https?:\/\//.test(Z)?x[X].setAttribute("target",H):P&&this.isCustomLink(Z)&&x[X].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(x){x=new mxSvgCanvas2D(x);x.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;x.pointerEvents=!0;return x};Graph.prototype.getSelectedElement=function(){var x=null;if(window.getSelection){var H=window.getSelection();H.getRangeAt&&H.rangeCount&&(x=H.getRangeAt(0).commonAncestorContainer)}else document.selection&&
+(x=document.selection.createRange().parentElement());return x};Graph.prototype.getSelectedEditingElement=function(){for(var x=this.getSelectedElement();null!=x&&x.nodeType!=mxConstants.NODETYPE_ELEMENT;)x=x.parentNode;null!=x&&x==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(x=this.cellEditor.textarea.firstChild);return x};Graph.prototype.getParentByName=function(x,H,P){for(;null!=x&&x.nodeName!=
+H;){if(x==P)return null;x=x.parentNode}return x};Graph.prototype.getParentByNames=function(x,H,P){for(;null!=x&&!(0<=mxUtils.indexOf(H,x.nodeName));){if(x==P)return null;x=x.parentNode}return x};Graph.prototype.selectNode=function(x){var H=null;if(window.getSelection){if(H=window.getSelection(),H.getRangeAt&&H.rangeCount){var P=document.createRange();P.selectNode(x);H.removeAllRanges();H.addRange(P)}}else(H=document.selection)&&"Control"!=H.type&&(x=H.createRange(),x.collapse(!0),P=H.createRange(),
+P.setEndPoint("StartToStart",x),P.select())};Graph.prototype.flipEdgePoints=function(x,H,P){var X=this.getCellGeometry(x);if(null!=X){X=X.clone();if(null!=X.points)for(var Z=0;Z<X.points.length;Z++)H?X.points[Z].x=P+(P-X.points[Z].x):X.points[Z].y=P+(P-X.points[Z].y);Z=function(fa){null!=fa&&(H?fa.x=P+(P-fa.x):fa.y=P+(P-fa.y))};Z(X.getTerminalPoint(!0));Z(X.getTerminalPoint(!1));this.model.setGeometry(x,X)}};Graph.prototype.flipChildren=function(x,H,P){this.model.beginUpdate();try{for(var X=this.model.getChildCount(x),
+Z=0;Z<X;Z++){var fa=this.model.getChildAt(x,Z);if(this.model.isEdge(fa))this.flipEdgePoints(fa,H,P);else{var la=this.getCellGeometry(fa);null!=la&&(la=la.clone(),H?la.x=P+(P-la.x-la.width):la.y=P+(P-la.y-la.height),this.model.setGeometry(fa,la))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(x,H){this.model.beginUpdate();try{x=this.model.getTopmostCells(x);for(var P=[],X=0;X<x.length;X++)if(this.model.isEdge(x[X])){var Z=this.view.getState(x[X]);null!=Z&&this.flipEdgePoints(x[X],
+H,(H?Z.getCenterX():Z.getCenterY())/this.view.scale-(H?Z.origin.x:Z.origin.y)-(H?this.view.translate.x:this.view.translate.y))}else{var fa=this.getCellGeometry(x[X]);null!=fa&&this.flipChildren(x[X],H,H?fa.getCenterX()-fa.x:fa.getCenterY()-fa.y);P.push(x[X])}this.toggleCellStyles(H?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,P)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(x,H){var P=null;if(null!=x&&0<x.length){this.model.beginUpdate();try{for(var X=0;X<x.length;X++){var Z=
+this.model.getParent(x[X]);if(this.isTable(Z)){var fa=this.getCellGeometry(x[X]),la=this.getCellGeometry(Z);null!=fa&&null!=la&&(la=la.clone(),la.height-=fa.height,this.model.setGeometry(Z,la))}}var za=this.selectParentAfterDelete?this.model.getParents(x):null;this.removeCells(x,H)}finally{this.model.endUpdate()}if(null!=za)for(P=[],X=0;X<za.length;X++)this.model.contains(za[X])&&(this.model.isVertex(za[X])||this.model.isEdge(za[X]))&&P.push(za[X])}return P};Graph.prototype.insertTableColumn=function(x,
+H){var P=this.getModel();P.beginUpdate();try{var X=x,Z=0;if(this.isTableCell(x)){var fa=P.getParent(x);X=P.getParent(fa);Z=mxUtils.indexOf(P.getChildCells(fa,!0),x)}else this.isTableRow(x)?X=P.getParent(x):x=P.getChildCells(X,!0)[0],H||(Z=P.getChildCells(x,!0).length-1);var la=P.getChildCells(X,!0),za=Graph.minTableColumnWidth;for(x=0;x<la.length;x++){var ua=P.getChildCells(la[x],!0)[Z],oa=P.cloneCell(ua,!1),ta=this.getCellGeometry(oa);oa.value=null;oa.style=mxUtils.setStyle(mxUtils.setStyle(oa.style,
+"rowspan",null),"colspan",null);if(null!=ta){null!=ta.alternateBounds&&(ta.width=ta.alternateBounds.width,ta.height=ta.alternateBounds.height,ta.alternateBounds=null);za=ta.width;var Ea=this.getCellGeometry(la[x]);null!=Ea&&(ta.height=Ea.height)}P.add(la[x],oa,Z+(H?0:1))}var Fa=this.getCellGeometry(X);null!=Fa&&(Fa=Fa.clone(),Fa.width+=za,P.setGeometry(X,Fa))}finally{P.endUpdate()}};Graph.prototype.deleteLane=function(x){var H=this.getModel();H.beginUpdate();try{var P=null;P="stackLayout"==this.getCurrentCellStyle(x).childLayout?
+x:H.getParent(x);var X=H.getChildCells(P,!0);0==X.length?H.remove(P):(P==x&&(x=X[X.length-1]),H.remove(x))}finally{H.endUpdate()}};Graph.prototype.insertLane=function(x,H){var P=this.getModel();P.beginUpdate();try{var X=null;if("stackLayout"==this.getCurrentCellStyle(x).childLayout){X=x;var Z=P.getChildCells(X,!0);x=Z[H?0:Z.length-1]}else X=P.getParent(x);var fa=X.getIndex(x);x=P.cloneCell(x,!1);x.value=null;P.add(X,x,fa+(H?0:1))}finally{P.endUpdate()}};Graph.prototype.insertTableRow=function(x,H){var P=
+this.getModel();P.beginUpdate();try{var X=x,Z=x;if(this.isTableCell(x))Z=P.getParent(x),X=P.getParent(Z);else if(this.isTableRow(x))X=P.getParent(x);else{var fa=P.getChildCells(X,!0);Z=fa[H?0:fa.length-1]}var la=P.getChildCells(Z,!0),za=X.getIndex(Z);Z=P.cloneCell(Z,!1);Z.value=null;var ua=this.getCellGeometry(Z);if(null!=ua){for(fa=0;fa<la.length;fa++){x=P.cloneCell(la[fa],!1);x.value=null;x.style=mxUtils.setStyle(mxUtils.setStyle(x.style,"rowspan",null),"colspan",null);var oa=this.getCellGeometry(x);
+null!=oa&&(null!=oa.alternateBounds&&(oa.width=oa.alternateBounds.width,oa.height=oa.alternateBounds.height,oa.alternateBounds=null),oa.height=ua.height);Z.insert(x)}P.add(X,Z,za+(H?0:1));var ta=this.getCellGeometry(X);null!=ta&&(ta=ta.clone(),ta.height+=ua.height,P.setGeometry(X,ta))}}finally{P.endUpdate()}};Graph.prototype.deleteTableColumn=function(x){var H=this.getModel();H.beginUpdate();try{var P=x,X=x;this.isTableCell(x)&&(X=H.getParent(x));this.isTableRow(X)&&(P=H.getParent(X));var Z=H.getChildCells(P,
+!0);if(0==Z.length)H.remove(P);else{this.isTableRow(X)||(X=Z[0]);var fa=H.getChildCells(X,!0);if(1>=fa.length)H.remove(P);else{var la=fa.length-1;this.isTableCell(x)&&(la=mxUtils.indexOf(fa,x));for(X=x=0;X<Z.length;X++){var za=H.getChildCells(Z[X],!0)[la];H.remove(za);var ua=this.getCellGeometry(za);null!=ua&&(x=Math.max(x,ua.width))}var oa=this.getCellGeometry(P);null!=oa&&(oa=oa.clone(),oa.width-=x,H.setGeometry(P,oa))}}}finally{H.endUpdate()}};Graph.prototype.deleteTableRow=function(x){var H=this.getModel();
+H.beginUpdate();try{var P=x,X=x;this.isTableCell(x)&&(x=X=H.getParent(x));this.isTableRow(x)&&(P=H.getParent(X));var Z=H.getChildCells(P,!0);if(1>=Z.length)H.remove(P);else{this.isTableRow(X)||(X=Z[Z.length-1]);H.remove(X);x=0;var fa=this.getCellGeometry(X);null!=fa&&(x=fa.height);var la=this.getCellGeometry(P);null!=la&&(la=la.clone(),la.height-=x,H.setGeometry(P,la))}}finally{H.endUpdate()}};Graph.prototype.insertRow=function(x,H){for(var P=x.tBodies[0],X=P.rows[0].cells,Z=x=0;Z<X.length;Z++){var fa=
+X[Z].getAttribute("colspan");x+=null!=fa?parseInt(fa):1}H=P.insertRow(H);for(Z=0;Z<x;Z++)mxUtils.br(H.insertCell(-1));return H.cells[0]};Graph.prototype.deleteRow=function(x,H){x.tBodies[0].deleteRow(H)};Graph.prototype.insertColumn=function(x,H){var P=x.tHead;if(null!=P)for(var X=0;X<P.rows.length;X++){var Z=document.createElement("th");P.rows[X].appendChild(Z);mxUtils.br(Z)}x=x.tBodies[0];for(P=0;P<x.rows.length;P++)X=x.rows[P].insertCell(H),mxUtils.br(X);return x.rows[0].cells[0<=H?H:x.rows[0].cells.length-
+1]};Graph.prototype.deleteColumn=function(x,H){if(0<=H){x=x.tBodies[0].rows;for(var P=0;P<x.length;P++)x[P].cells.length>H&&x[P].deleteCell(H)}};Graph.prototype.pasteHtmlAtCaret=function(x){if(window.getSelection){var H=window.getSelection();if(H.getRangeAt&&H.rangeCount){H=H.getRangeAt(0);H.deleteContents();var P=document.createElement("div");P.innerHTML=x;x=document.createDocumentFragment();for(var X;X=P.firstChild;)lastNode=x.appendChild(X);H.insertNode(x)}}else(H=document.selection)&&"Control"!=
+H.type&&H.createRange().pasteHTML(x)};Graph.prototype.createLinkForHint=function(x,H){function P(Z,fa){Z.length>fa&&(Z=Z.substring(0,Math.round(fa/2))+"..."+Z.substring(Z.length-Math.round(fa/4)));return Z}x=null!=x?x:"javascript:void(0);";if(null==H||0==H.length)H=this.isCustomLink(x)?this.getLinkTitle(x):x;var X=document.createElement("a");X.setAttribute("rel",this.linkRelation);X.setAttribute("href",this.getAbsoluteUrl(x));X.setAttribute("title",P(this.isCustomLink(x)?this.getLinkTitle(x):x,80));
+null!=this.linkTarget&&X.setAttribute("target",this.linkTarget);mxUtils.write(X,P(H,40));this.isCustomLink(x)&&mxEvent.addListener(X,"click",mxUtils.bind(this,function(Z){this.customLinkClicked(x);mxEvent.consume(Z)}));return X};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(fa,la){this.popupMenuHandler.hideMenu()});var x=this.updateMouseEvent;this.updateMouseEvent=
+function(fa){fa=x.apply(this,arguments);if(mxEvent.isTouchEvent(fa.getEvent())&&null==fa.getState()){var la=this.getCellAt(fa.graphX,fa.graphY);null!=la&&this.isSwimlane(la)&&this.hitsSwimlaneContent(la,fa.graphX,fa.graphY)||(fa.state=this.view.getState(la),null!=fa.state&&null!=fa.state.shape&&(this.container.style.cursor=fa.state.shape.node.style.cursor))}null==fa.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return fa};var H=!1,P=!1,X=!1,Z=this.fireMouseEvent;this.fireMouseEvent=
+function(fa,la,za){fa==mxEvent.MOUSE_DOWN&&(la=this.updateMouseEvent(la),H=this.isCellSelected(la.getCell()),P=this.isSelectionEmpty(),X=this.popupMenuHandler.isMenuShowing());Z.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(fa,la){var za=mxEvent.isMouseEvent(la.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==la.getState()||!la.isSource(la.getState().control))&&(this.popupMenuHandler.popupTrigger||!X&&!za&&(P&&null==la.getCell()&&
+this.isSelectionEmpty()||H&&this.isCellSelected(la.getCell())));za=!H||za?null:mxUtils.bind(this,function(ua){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var oa=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(la.getX()+oa.x+1,la.getY()+oa.y+1,ua,la.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[fa,la,za])})};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 H=this.textarea.ownerDocument.defaultView.getSelection(),P=H.getRangeAt(0),
+X="\t";if(null!=x)for(X="";0<x;)X+=" ",x--;x=document.createElement("span");x.style.whiteSpace="pre";x.appendChild(document.createTextNode(X));P.insertNode(x);P.setStartAfter(x);P.setEndAfter(x);H.removeAllRanges();H.addRange(P)};mxCellEditor.prototype.alignText=function(x,H){var P=null!=H&&mxEvent.isShiftDown(H);if(P||null!=window.getSelection&&null!=window.getSelection().containsNode){var X=!0;this.graph.processElements(this.textarea,function(Z){P||window.getSelection().containsNode(Z,!0)?(Z.removeAttribute("align"),
+Z.style.textAlign=null):X=!1});X&&this.graph.cellEditor.setAlign(x)}document.execCommand("justify"+x.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var x=window.getSelection();if(x.getRangeAt&&x.rangeCount){for(var H=[],P=0,X=x.rangeCount;P<X;++P)H.push(x.getRangeAt(P));return H}}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 H=0,P=x.length;H<P;++H)sel.addRange(x[H])}else document.selection&&x.select&&x.select()}catch(X){}};var k=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(x){null!=x.text&&(x.text.replaceLinefeeds="0"!=mxUtils.getValue(x.style,"nl2Br","1"));k.apply(this,arguments)};var z=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(x,H){this.isKeepFocusEvent(x)||!mxEvent.isAltDown(x.getEvent())?
+z.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(x){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var t=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(x,H){x=this.graph.getStartEditingCell(x,H);t.apply(this,arguments);var P=this.graph.view.getState(x);this.textarea.className=null!=P&&1==P.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";
+this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(x);P=this.graph.getModel().getParent(x);var X=this.graph.getCellGeometry(x);if(this.graph.getModel().isEdge(P)&&null!=X&&X.relative||this.graph.getModel().isEdge(x))this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var B=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(x){function H(Z,fa){fa.originalNode=Z;Z=Z.firstChild;
+for(var la=fa.firstChild;null!=Z&&null!=la;)H(Z,la),Z=Z.nextSibling,la=la.nextSibling;return fa}function P(Z,fa){if(null!=Z)if(fa.originalNode!=Z)X(Z);else for(Z=Z.firstChild,fa=fa.firstChild;null!=Z;){var la=Z.nextSibling;null==fa?X(Z):(P(Z,fa),fa=fa.nextSibling);Z=la}}function X(Z){for(var fa=Z.firstChild;null!=fa;){var la=fa.nextSibling;X(fa);fa=la}1==Z.nodeType&&("BR"===Z.nodeName||null!=Z.firstChild)||3==Z.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(Z)).length?(3==Z.nodeType&&mxUtils.setTextContent(Z,
+mxUtils.getTextContent(Z).replace(/\n|\r/g,"")),1==Z.nodeType&&(Z.removeAttribute("style"),Z.removeAttribute("class"),Z.removeAttribute("width"),Z.removeAttribute("cellpadding"),Z.removeAttribute("cellspacing"),Z.removeAttribute("border"))):Z.parentNode.removeChild(Z)}B.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(Z){var fa=H(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,
+function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?P(this.textarea,fa):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var x=this.graph.view.getState(this.editingCell);if(null!=x){var H=null!=x&&"0"!=mxUtils.getValue(x.style,"nl2Br","1"),P=this.saveSelection();if(this.codeViewMode){za=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);
+0<za.length&&"\n"==za.charAt(za.length-1)&&(za=za.substring(0,za.length-1));za=this.graph.sanitizeHtml(H?za.replace(/\n/g,"<br/>"):za,!0);this.textarea.className="mxCellEditor geContentEditable";ua=mxUtils.getValue(x.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);H=mxUtils.getValue(x.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var X=mxUtils.getValue(x.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),Z=(mxUtils.getValue(x.style,mxConstants.STYLE_FONTSTYLE,
+0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,fa=(mxUtils.getValue(x.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,la=[];(mxUtils.getValue(x.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&la.push("underline");(mxUtils.getValue(x.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&la.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?
+Math.round(ua*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ua)+"px";this.textarea.style.textDecoration=la.join(" ");this.textarea.style.fontWeight=Z?"bold":"normal";this.textarea.style.fontStyle=fa?"italic":"";this.textarea.style.fontFamily=H;this.textarea.style.textAlign=X;this.textarea.style.padding="0px";this.textarea.innerHTML!=za&&(this.textarea.innerHTML=za,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=
+0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");var za=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(za=mxUtils.replaceTrailingNewlines(za,"<div><br></div>"));za=this.graph.sanitizeHtml(H?za.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):za,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var ua=mxConstants.DEFAULT_FONTSIZE;
+this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ua*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ua)+"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!=za&&(this.textarea.innerHTML=
+za);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=P;this.resize()}};var I=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(x,H){if(null!=this.textarea)if(x=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=x){var P=x.view.scale;this.bounds=mxRectangle.fromRectangle(x);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*P;this.bounds.height=
+60*P;var X=null!=x.text?x.text.margin:null;null==X&&(X=mxUtils.getAlignmentAsPoint(mxUtils.getValue(x.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(x.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=X.x*this.bounds.width;this.bounds.y+=X.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/P)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/P)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<
+this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/P)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*P);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/P)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*P);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=
+Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+P+","+P+")")}else this.textarea.style.height="",this.textarea.style.overflow="",I.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(x,H){if("0"==mxUtils.getValue(x.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var P=this.graph.getEditingValue(x.cell,H);"1"==mxUtils.getValue(x.style,"nl2Br",
+"1")&&(P=P.replace(/\n/g,"<br/>"));return P=this.graph.sanitizeHtml(P,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(x){if("0"==mxUtils.getValue(x.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var H=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return H="1"==mxUtils.getValue(x.style,"nl2Br","1")?H.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):H.replace(/\r\n/g,"").replace(/\n/g,"")};var O=
+mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(x){this.codeViewMode&&this.toggleViewMode();O.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,H){this.graph.getModel().beginUpdate();try{J.apply(this,arguments),""==H&&this.graph.isCellDeletable(x.cell)&&0==this.graph.model.getChildCount(x.cell)&&
+this.graph.isTransparentState(x)&&this.graph.removeCells([x.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(x){var H=mxUtils.getValue(x.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=H&&H!=mxConstants.NONE||!(null!=x.cell.geometry&&0<x.cell.geometry.width)||0==mxUtils.getValue(x.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(x.style,mxConstants.STYLE_HORIZONTAL,1)||(H=mxUtils.getValue(x.style,mxConstants.STYLE_FILLCOLOR,
+null));H==mxConstants.NONE&&(H=null);return H};mxCellEditor.prototype.getBorderColor=function(x){var H=mxUtils.getValue(x.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);null!=H&&H!=mxConstants.NONE||!(null!=x.cell.geometry&&0<x.cell.geometry.width)||0==mxUtils.getValue(x.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(x.style,mxConstants.STYLE_HORIZONTAL,1)||(H=mxUtils.getValue(x.style,mxConstants.STYLE_STROKECOLOR,null));H==mxConstants.NONE&&(H=null);return H};mxCellEditor.prototype.getMinimumSize=
+function(x){var H=this.graph.getView().scale;return new mxRectangle(0,0,null==x.text?30:x.text.size*H+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(x,H){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(H.getEvent)};mxGraphView.prototype.formatUnitText=function(x){return x?d(x,this.unit):x};mxGraphHandler.prototype.updateHint=function(x){if(null!=this.pBounds&&(null!=this.shape||
+this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var H=this.graph.view.translate,P=this.graph.view.scale;x=this.roundLength((this.bounds.x+this.currentDx)/P-H.x);H=this.roundLength((this.bounds.y+this.currentDy)/P-H.y);P=this.graph.view.unit;this.hint.innerHTML=d(x,P)+", "+d(H,P);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+
+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var y=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(x,H){y.apply(this,arguments);var P=this.graph.getCellStyle(x);if(null==P.childLayout){var X=this.graph.model.getParent(x),Z=null!=X?this.graph.getCellGeometry(X):null;if(null!=Z&&(P=this.graph.getCellStyle(X),"stackLayout"==P.childLayout)){var fa=parseFloat(mxUtils.getValue(P,
+"stackBorder",mxStackLayout.prototype.border));P="1"==mxUtils.getValue(P,"horizontalStack","1");var la=this.graph.getActualStartSize(X);Z=Z.clone();P?Z.height=H.height+la.y+la.height+2*fa:Z.width=H.width+la.x+la.width+2*fa;this.graph.model.setGeometry(X,Z)}}};var ia=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function x(za){P.get(za)||(P.put(za,!0),Z.push(za))}for(var H=ia.apply(this,arguments),P=new mxDictionary,
+X=this.graph.model,Z=[],fa=0;fa<H.length;fa++){var la=H[fa];this.graph.isTableCell(la)?x(X.getParent(X.getParent(la))):this.graph.isTableRow(la)&&x(X.getParent(la));x(la)}return Z};var da=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(x){var H=da.apply(this,arguments);H.stroke="#C0C0C0";H.strokewidth=1;return H};var ja=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(x){var H=
+ja.apply(this,arguments);H.stroke="#C0C0C0";H.strokewidth=1;return H};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,H){return this.graph.isRecursiveVertexResize(x)&&!mxEvent.isAltDown(H.getEvent())};mxVertexHandler.prototype.isCenteredEvent=
+function(x,H){return mxEvent.isControlDown(H.getEvent())||mxEvent.isMetaDown(H.getEvent())};var aa=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return aa.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 qa=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return qa.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var sa=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(x){return x.tableHandle||sa.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=
+function(){var x=0;this.graph.isTableRow(this.state.cell)?x=1:this.graph.isTableCell(this.state.cell)&&(x=2);return x};var L=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return L.apply(this,arguments).grow(-this.getSelectionBorderInset())};var V=null,T=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==V&&(V=mxCellRenderer.defaultShapes.tableLine);var x=T.apply(this,arguments);
+if(this.graph.isTable(this.state.cell)){var H=function(Ra,Ca,Ja){for(var Qa=[],$a=0;$a<Ra.length;$a++){var eb=Ra[$a];Qa.push(null==eb?null:new mxPoint((ua+eb.x+Ca)*fa,(oa+eb.y+Ja)*fa))}return Qa},P=this,X=this.graph,Z=X.model,fa=X.view.scale,la=this.state,za=this.selectionBorder,ua=this.state.origin.x+X.view.translate.x,oa=this.state.origin.y+X.view.translate.y;null==x&&(x=[]);var ta=X.view.getCellStates(Z.getChildCells(this.state.cell,!0));if(0<ta.length){var Ea=Z.getChildCells(ta[0].cell,!0),Fa=
+X.getTableLines(this.state.cell,!1,!0),Pa=X.getTableLines(this.state.cell,!0,!1);for(Z=0;Z<ta.length;Z++)mxUtils.bind(this,function(Ra){var Ca=ta[Ra],Ja=Ra<ta.length-1?ta[Ra+1]:null;Ja=null!=Ja?X.getCellGeometry(Ja.cell):null;var Qa=null!=Ja&&null!=Ja.alternateBounds?Ja.alternateBounds:Ja;Ja=null!=Pa[Ra]?new V(Pa[Ra],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Ja.isDashed=za.isDashed;Ja.svgStrokeTolerance++;Ca=new mxHandle(Ca,"row-resize",null,Ja);Ca.tableHandle=!0;var $a=
+0;Ca.shape.node.parentNode.insertBefore(Ca.shape.node,Ca.shape.node.parentNode.firstChild);Ca.redraw=function(){if(null!=this.shape){this.shape.stroke=0==$a?mxConstants.NONE:za.stroke;if(this.shape.constructor==V)this.shape.line=H(Pa[Ra],0,$a),this.shape.updateBoundsFromLine();else{var cb=X.getActualStartSize(la.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+$a*fa;this.shape.bounds.x=la.x+(Ra==ta.length-1?0:cb.x*fa);this.shape.bounds.width=la.width-(Ra==ta.length-
+1?0:cb.width+cb.x+fa)}this.shape.redraw()}};var eb=!1;Ca.setPosition=function(cb,db,rb){$a=Math.max(Graph.minTableRowHeight-cb.height,db.y-cb.y-cb.height);eb=mxEvent.isShiftDown(rb.getEvent());null!=Qa&&eb&&($a=Math.min($a,Qa.height-Graph.minTableRowHeight))};Ca.execute=function(cb){if(0!=$a)X.setTableRowHeight(this.state.cell,$a,!eb);else if(!P.blockDelayedSelection){var db=X.getCellAt(cb.getGraphX(),cb.getGraphY())||la.cell;X.graphHandler.selectCellForEvent(db,cb)}$a=0};Ca.reset=function(){$a=0};
+x.push(Ca)})(Z);for(Z=0;Z<Ea.length;Z++)mxUtils.bind(this,function(Ra){var Ca=X.view.getState(Ea[Ra]),Ja=X.getCellGeometry(Ea[Ra]),Qa=null!=Ja.alternateBounds?Ja.alternateBounds:Ja;null==Ca&&(Ca=new mxCellState(X.view,Ea[Ra],X.getCellStyle(Ea[Ra])),Ca.x=la.x+Ja.x*fa,Ca.y=la.y+Ja.y*fa,Ca.width=Qa.width*fa,Ca.height=Qa.height*fa,Ca.updateCachedBounds());Ja=Ra<Ea.length-1?Ea[Ra+1]:null;Ja=null!=Ja?X.getCellGeometry(Ja):null;var $a=null!=Ja&&null!=Ja.alternateBounds?Ja.alternateBounds:Ja;Ja=null!=Fa[Ra]?
+new V(Fa[Ra],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);Ja.isDashed=za.isDashed;Ja.svgStrokeTolerance++;Ca=new mxHandle(Ca,"col-resize",null,Ja);Ca.tableHandle=!0;var eb=0;Ca.shape.node.parentNode.insertBefore(Ca.shape.node,Ca.shape.node.parentNode.firstChild);Ca.redraw=function(){if(null!=this.shape){this.shape.stroke=0==eb?mxConstants.NONE:za.stroke;if(this.shape.constructor==V)this.shape.line=H(Fa[Ra],eb,0),this.shape.updateBoundsFromLine();else{var db=X.getActualStartSize(la.cell,
+!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(Qa.width+eb)*fa;this.shape.bounds.y=la.y+(Ra==Ea.length-1?0:db.y*fa);this.shape.bounds.height=la.height-(Ra==Ea.length-1?0:(db.height+db.y)*fa)}this.shape.redraw()}};var cb=!1;Ca.setPosition=function(db,rb,mb){eb=Math.max(Graph.minTableColumnWidth-Qa.width,rb.x-db.x-Qa.width);cb=mxEvent.isShiftDown(mb.getEvent());null==$a||cb||(eb=Math.min(eb,$a.width-Graph.minTableColumnWidth))};Ca.execute=function(db){if(0!=eb)X.setTableColumnWidth(this.state.cell,
+eb,cb);else if(!P.blockDelayedSelection){var rb=X.getCellAt(db.getGraphX(),db.getGraphY())||la.cell;X.graphHandler.selectCellForEvent(rb,db)}eb=0};Ca.positionChanged=function(){};Ca.reset=function(){eb=0};x.push(Ca)})(Z)}}return null!=x?x.reverse():null};var Y=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(x){Y.apply(this,arguments);if(null!=this.moveHandles)for(var H=0;H<this.moveHandles.length;H++)this.moveHandles[H].style.visibility=x?"":"hidden";
+if(null!=this.cornerHandles)for(H=0;H<this.cornerHandles.length;H++)this.cornerHandles[H].node.style.visibility=x?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var x=this.graph.model;if(null!=this.moveHandles){for(var H=0;H<this.moveHandles.length;H++)this.moveHandles[H].parentNode.removeChild(this.moveHandles[H]);this.moveHandles=null}this.moveHandles=[];for(H=0;H<x.getChildCount(this.state.cell);H++)mxUtils.bind(this,function(P){if(null!=P&&x.isVertex(P.cell)){var X=mxUtils.createImage(Editor.rowMoveImage);
+X.style.position="absolute";X.style.cursor="pointer";X.style.width="7px";X.style.height="4px";X.style.padding="4px 2px 4px 2px";X.rowState=P;mxEvent.addGestureListeners(X,mxUtils.bind(this,function(Z){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(Z)&&this.graph.isCellSelected(P.cell)||this.graph.selectCellForEvent(P.cell,Z);mxEvent.isPopupTrigger(Z)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(Z),mxEvent.getClientY(Z),this.graph.getSelectionCells()),
+this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(Z),this.graph.isMouseDown=!0);mxEvent.consume(Z)}),null,mxUtils.bind(this,function(Z){mxEvent.isPopupTrigger(Z)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(Z),mxEvent.getClientY(Z),P.cell,Z),mxEvent.consume(Z))}));this.moveHandles.push(X);this.graph.container.appendChild(X)}})(this.graph.view.getState(x.getChildAt(this.state.cell,H)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var x=
+0;x<this.customHandles.length;x++)this.customHandles[x].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var W=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var x=new mxPoint(0,0),H=this.tolerance,P=this.state.style.shape;null==mxCellRenderer.defaultShapes[P]&&mxStencilRegistry.getStencil(P);P=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;
+if(!P&&null!=this.customHandles)for(var X=0;X<this.customHandles.length;X++)if(null!=this.customHandles[X].shape&&null!=this.customHandles[X].shape.bounds){var Z=this.customHandles[X].shape.bounds,fa=Z.getCenterX(),la=Z.getCenterY();if(Math.abs(this.state.x-fa)<Z.width/2||Math.abs(this.state.y-la)<Z.height/2||Math.abs(this.state.x+this.state.width-fa)<Z.width/2||Math.abs(this.state.y+this.state.height-la)<Z.height/2){P=!0;break}}P&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(H/=
+2,this.graph.isTable(this.state.cell)&&(H+=7),x.x=this.sizers[0].bounds.width+H,x.y=this.sizers[0].bounds.height+H):x=W.apply(this,arguments);return x};mxVertexHandler.prototype.updateHint=function(x){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{x=this.state.view.scale;var H=this.state.view.unit;this.hint.innerHTML=d(this.roundLength(this.bounds.width/
+x),H)+" x "+d(this.roundLength(this.bounds.height/x),H)}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 ka=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(x,H){ka.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var q=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(x,H){q.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display=
+"")};mxEdgeHandler.prototype.updateHint=function(x,H){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var P=this.graph.view.translate,X=this.graph.view.scale,Z=this.roundLength(H.x/X-P.x);P=this.roundLength(H.y/X-P.y);X=this.graph.view.unit;this.hint.innerHTML=d(Z,X)+", "+d(P,X);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(Z=this.constraintHandler.currentConstraint.point,
+this.hint.innerHTML="["+Math.round(100*Z.x)+"%, "+Math.round(100*Z.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(),H.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="'+
@@ -2652,464 +2651,464 @@ HoverIcons.prototype.arrowFill+'"/><circle cx="11" cy="11" r="3" stroke="#fff" f
mxEdgeHandler.prototype.endHandleImage=HoverIcons.prototype.endMainHandle;mxEdgeHandler.prototype.terminalHandleImage=HoverIcons.prototype.terminalHandle;mxEdgeHandler.prototype.endTerminalHandleImage=HoverIcons.prototype.endTerminalHandle;mxEdgeHandler.prototype.fixedHandleImage=HoverIcons.prototype.fixedHandle;mxEdgeHandler.prototype.endFixedHandleImage=HoverIcons.prototype.endFixedHandle;mxEdgeHandler.prototype.labelHandleImage=HoverIcons.prototype.secondaryHandle;mxOutline.prototype.sizerImage=
HoverIcons.prototype.mainHandle;null!=window.Sidebar&&(Sidebar.prototype.triangleUp=HoverIcons.prototype.triangleUp,Sidebar.prototype.triangleRight=HoverIcons.prototype.triangleRight,Sidebar.prototype.triangleDown=HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prototype.triangleLeft,Sidebar.prototype.refreshTarget=HoverIcons.prototype.refreshTarget,Sidebar.prototype.roundDrop=HoverIcons.prototype.roundDrop);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=
!0;mxVertexHandler.prototype.livePreview=!0;mxGraphHandler.prototype.maxLivePreview=16;mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=!0;mxVertexHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=
-!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(z){return!mxEvent.isShiftDown(z.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(z){return!mxEvent.isShiftDown(z.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(z){return mxEvent.isMouseEvent(z.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(z){var J=z.getEvent();return null==z.getState()&&!mxEvent.isMouseEvent(J)||mxEvent.isPopupTrigger(J)&&(null==z.getState()||mxEvent.isControlDown(J)||mxEvent.isShiftDown(J))};var E=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=
-function(z,J){E.apply(this,arguments);mxEvent.isTouchEvent(J.getEvent())&&this.graph.isCellSelected(J.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(z){var J=z.getEvent();return mxEvent.isLeftMouseButton(J)&&(this.useLeftButtonForPanning&&null==z.getState()||mxEvent.isControlDown(J)&&!mxEvent.isShiftDown(J))||this.usePopupTrigger&&mxEvent.isPopupTrigger(J)};mxRubberband.prototype.isSpaceEvent=function(z){return this.graph.isEnabled()&&
-!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(z.getEvent())||mxEvent.isMetaDown(z.getEvent()))&&mxEvent.isShiftDown(z.getEvent())&&mxEvent.isAltDown(z.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(z,J){if(this.cancelled)this.cancelled=!1,J.consume();else{var O=null!=this.div&&"none"!=this.div.style.display,U=null,W=null,ea=z=null;
-null!=this.first&&null!=this.currentX&&null!=this.currentY&&(U=this.first.x,W=this.first.y,z=(this.currentX-U)/this.graph.view.scale,ea=(this.currentY-W)/this.graph.view.scale,mxEvent.isAltDown(J.getEvent())||(z=this.graph.snap(z),ea=this.graph.snap(ea),this.graph.isGridEnabled()||(Math.abs(z)<this.graph.tolerance&&(z=0),Math.abs(ea)<this.graph.tolerance&&(ea=0))));this.reset();if(O){if(this.isSpaceEvent(J)){this.graph.model.beginUpdate();try{var ka=this.graph.getCellsBeyond(U,W,this.graph.getDefaultParent(),
-!0,!0);for(O=0;O<ka.length;O++)if(this.graph.isCellMovable(ka[O])){var xa=this.graph.view.getState(ka[O]),ta=this.graph.getCellGeometry(ka[O]);null!=xa&&null!=ta&&(ta=ta.clone(),ta.translate(z,ea),this.graph.model.setGeometry(ka[O],ta))}}finally{this.graph.model.endUpdate()}}else ka=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(ka,J.getEvent());J.consume()}}};mxRubberband.prototype.mouseMove=function(z,J){if(!J.isConsumed()&&null!=this.first){var O=mxUtils.getScrollOrigin(this.graph.container);
-z=mxUtils.getOffset(this.graph.container);O.x-=z.x;O.y-=z.y;z=J.getX()+O.x;O=J.getY()+O.y;var U=this.first.x-z,W=this.first.y-O,ea=this.graph.tolerance;if(null!=this.div||Math.abs(U)>ea||Math.abs(W)>ea)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(z,O),this.isSpaceEvent(J)?(z=this.x+this.width,O=this.y+this.height,U=this.graph.view.scale,mxEvent.isAltDown(J.getEvent())||(this.width=this.graph.snap(this.width/U)*U,this.height=this.graph.snap(this.height/U)*U,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=z-this.width),this.y<this.first.y&&(this.y=O-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",
+!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(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 H=x.getEvent();return null==x.getState()&&!mxEvent.isMouseEvent(H)||mxEvent.isPopupTrigger(H)&&(null==x.getState()||mxEvent.isControlDown(H)||mxEvent.isShiftDown(H))};var F=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=
+function(x,H){F.apply(this,arguments);mxEvent.isTouchEvent(H.getEvent())&&this.graph.isCellSelected(H.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(x){var H=x.getEvent();return mxEvent.isLeftMouseButton(H)&&(this.useLeftButtonForPanning&&null==x.getState()||mxEvent.isControlDown(H)&&!mxEvent.isShiftDown(H))||this.usePopupTrigger&&mxEvent.isPopupTrigger(H)};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,H){if(this.cancelled)this.cancelled=!1,H.consume();else{var P=null!=this.div&&"none"!=this.div.style.display,X=null,Z=null,fa=x=null;
+null!=this.first&&null!=this.currentX&&null!=this.currentY&&(X=this.first.x,Z=this.first.y,x=(this.currentX-X)/this.graph.view.scale,fa=(this.currentY-Z)/this.graph.view.scale,mxEvent.isAltDown(H.getEvent())||(x=this.graph.snap(x),fa=this.graph.snap(fa),this.graph.isGridEnabled()||(Math.abs(x)<this.graph.tolerance&&(x=0),Math.abs(fa)<this.graph.tolerance&&(fa=0))));this.reset();if(P){if(this.isSpaceEvent(H)){this.graph.model.beginUpdate();try{var la=this.graph.getCellsBeyond(X,Z,this.graph.getDefaultParent(),
+!0,!0);for(P=0;P<la.length;P++)if(this.graph.isCellMovable(la[P])){var za=this.graph.view.getState(la[P]),ua=this.graph.getCellGeometry(la[P]);null!=za&&null!=ua&&(ua=ua.clone(),ua.translate(x,fa),this.graph.model.setGeometry(la[P],ua))}}finally{this.graph.model.endUpdate()}}else la=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(la,H.getEvent());H.consume()}}};mxRubberband.prototype.mouseMove=function(x,H){if(!H.isConsumed()&&null!=this.first){var P=mxUtils.getScrollOrigin(this.graph.container);
+x=mxUtils.getOffset(this.graph.container);P.x-=x.x;P.y-=x.y;x=H.getX()+P.x;P=H.getY()+P.y;var X=this.first.x-x,Z=this.first.y-P,fa=this.graph.tolerance;if(null!=this.div||Math.abs(X)>fa||Math.abs(Z)>fa)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(x,P),this.isSpaceEvent(H)?(x=this.x+this.width,P=this.y+this.height,X=this.graph.view.scale,mxEvent.isAltDown(H.getEvent())||(this.width=this.graph.snap(this.width/X)*X,this.height=this.graph.snap(this.height/X)*X,this.graph.isGridEnabled()||
+(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=x-this.width),this.y<this.first.y&&(this.y=P-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",
null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&
-(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),J.consume()}};var Q=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);Q.apply(this,arguments)};var Y=(new Date).getTime(),R=0,Z=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(z,J,O,U){Z.apply(this,arguments);O!=this.currentTerminalState?(Y=(new Date).getTime(),
-R=0):R=(new Date).getTime()-Y;this.currentTerminalState=O};var da=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(z){return mxEvent.isShiftDown(z.getEvent())&&mxEvent.isAltDown(z.getEvent())?!1:null!=this.currentTerminalState&&z.getState()==this.currentTerminalState&&2E3<R||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&da.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=
-function(z,J,O){J=null!=z&&0==z;var U=this.state.getVisibleTerminalState(J);z=null!=z&&(0==z||z>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==z)?this.graph.getConnectionConstraint(this.state,U,J):null;O=null!=(null!=z?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(J),z):null)?O?this.endFixedHandleImage:this.fixedHandleImage:null!=z&&null!=U?O?this.endTerminalHandleImage:this.terminalHandleImage:O?this.endHandleImage:this.handleImage;if(null!=O)return O=
-new mxImageShape(new mxRectangle(0,0,O.width,O.height),O.src),O.preserveImageAspect=!1,O;O=mxConstants.HANDLE_SIZE;this.preferHtml&&--O;return new mxRectangleShape(new mxRectangle(0,0,O,O),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var qa=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(z,J,O){this.handleImage=J==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:J==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;
-return qa.apply(this,arguments)};var va=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(z){if(null!=z&&1==z.length){var J=this.graph.getModel(),O=J.getParent(z[0]),U=this.graph.getCellGeometry(z[0]);if(J.isEdge(O)&&null!=U&&U.relative&&(J=this.graph.view.getState(z[0]),null!=J&&2>J.width&&2>J.height&&null!=J.text&&null!=J.text.boundingBox))return mxRectangle.fromRectangle(J.text.boundingBox)}return va.apply(this,arguments)};var ja=mxGraphHandler.prototype.getGuideStates;
-mxGraphHandler.prototype.getGuideStates=function(){for(var z=ja.apply(this,arguments),J=[],O=0;O<z.length;O++)"1"!=mxUtils.getValue(z[O].style,"part","0")&&J.push(z[O]);return J};var sa=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(z){var J=this.graph.getModel(),O=J.getParent(z.cell),U=this.graph.getCellGeometry(z.cell);return J.isEdge(O)&&null!=U&&U.relative&&2>z.width&&2>z.height&&null!=z.text&&null!=z.text.boundingBox?(J=z.text.unrotatedBoundingBox||
-z.text.boundingBox,new mxRectangle(Math.round(J.x),Math.round(J.y),Math.round(J.width),Math.round(J.height))):sa.apply(this,arguments)};var ya=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(z,J){var O=this.graph.getModel(),U=O.getParent(this.state.cell),W=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(J)==mxEvent.ROTATION_HANDLE||!O.isEdge(U)||null==W||!W.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&ya.apply(this,arguments)};
-mxVertexHandler.prototype.rotateClick=function(){var z=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),J=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&z==mxConstants.NONE&&J==mxConstants.NONE?(z=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,z,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};
-var Aa=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(z,J){Aa.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 Ea=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(z,J){Ea.apply(this,arguments);null!=this.rotationShape&&null!=
-this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="");this.blockDelayedSelection=null};var za=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){za.apply(this,arguments);var z=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles();
-else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var J=0;4>J;J++){var O=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);O.dialect=mxConstants.DIALECT_SVG;O.init(this.graph.view.getOverlayPane());this.cornerHandles.push(O)}}var U=mxUtils.bind(this,function(){null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<
-this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(W,ea){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));U()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(W,ea){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);
-J=this.graph.getLinkForCell(this.state.cell);O=this.graph.getLinksForState(this.state);this.updateLinkHint(J,O);if(null!=J||null!=O&&0<O.length)z=!0;z&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(z,J){try{if(null==z&&(null==J||0==J.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=z||null!=J&&0<J.length){null==this.linkHint&&(this.linkHint=b(),this.linkHint.style.padding=
-"6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=z&&(this.linkHint.appendChild(this.graph.createLinkForHint(z)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var O=document.createElement("img");O.className="geAdaptiveAsset";O.setAttribute("src",Editor.editImage);
-O.setAttribute("title",mxResources.get("editLink"));O.setAttribute("width","11");O.setAttribute("height","11");O.style.marginLeft="10px";O.style.marginBottom="-1px";O.style.cursor="pointer";this.linkHint.appendChild(O);mxEvent.addListener(O,"click",mxUtils.bind(this,function(ea){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(ea)}));var U=O.cloneNode(!0);U.setAttribute("src",Editor.trashImage);U.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));
-U.style.marginLeft="4px";this.linkHint.appendChild(U);mxEvent.addListener(U,"click",mxUtils.bind(this,function(ea){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(ea)}))}if(null!=J)for(O=0;O<J.length;O++){var W=document.createElement("div");W.style.marginTop=null!=z||0<O?"6px":"0px";W.appendChild(this.graph.createLinkForHint(J[O].getAttribute("href"),mxUtils.getTextContent(J[O])));this.linkHint.appendChild(W)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(ea){}};mxEdgeHandler.prototype.updateLinkHint=
-mxVertexHandler.prototype.updateLinkHint;var Ia=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){Ia.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var z=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<
-this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(U,W){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));z();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var J=this.graph.getLinkForCell(this.state.cell),O=this.graph.getLinksForState(this.state);if(null!=J||null!=O&&0<O.length)this.updateLinkHint(J,
-O),this.redrawHandles()};var Ca=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Ca.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Sa=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var z=0;z<this.moveHandles.length;z++)this.moveHandles[z].style.left=this.moveHandles[z].rowState.x+this.moveHandles[z].rowState.width-
-5+"px",this.moveHandles[z].style.top=this.moveHandles[z].rowState.y+this.moveHandles[z].rowState.height/2-6+"px";if(null!=this.cornerHandles){z=this.getSelectionBorderInset();var J=this.cornerHandles,O=J[0].bounds.height/2;J[0].bounds.x=this.state.x-J[0].bounds.width/2+z;J[0].bounds.y=this.state.y-O+z;J[0].redraw();J[1].bounds.x=J[0].bounds.x+this.state.width-2*z;J[1].bounds.y=J[0].bounds.y;J[1].redraw();J[2].bounds.x=J[0].bounds.x;J[2].bounds.y=this.state.y+this.state.height-2*z;J[2].redraw();J[3].bounds.x=
-J[1].bounds.x;J[3].bounds.y=J[2].bounds.y;J[3].redraw();for(z=0;z<this.cornerHandles.length;z++)this.cornerHandles[z].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Sa.apply(this);null!=this.state&&null!=this.linkHint&&(z=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),
-J=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),O=mxUtils.getBoundingBox(J,this.state.style[mxConstants.STYLE_ROTATION]||"0",z),z=null!=O?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,J=null!=this.state.text?this.state.text.boundingBox:null,null==O&&(O=this.state),O=O.y+O.height,null!=J&&(O=Math.max(O,J.y+J.height)),this.linkHint.style.left=Math.max(0,Math.round(z.x+(z.width-this.linkHint.clientWidth)/2))+"px",
-this.linkHint.style.top=Math.round(O+this.verticalOffset/2+Editor.hintOffset)+"px")};var Pa=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Pa.apply(this,arguments);if(null!=this.moveHandles){for(var z=0;z<this.moveHandles.length;z++)null!=this.moveHandles[z]&&null!=this.moveHandles[z].parentNode&&this.moveHandles[z].parentNode.removeChild(this.moveHandles[z]);this.moveHandles=null}if(null!=this.cornerHandles){for(z=0;z<this.cornerHandles.length;z++)null!=this.cornerHandles[z]&&
-null!=this.cornerHandles[z].node&&null!=this.cornerHandles[z].node.parentNode&&this.cornerHandles[z].node.parentNode.removeChild(this.cornerHandles[z].node);this.cornerHandles=null}null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&
-(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var Ta=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Ta.apply(this),null!=this.state&&null!=this.linkHint)){var z=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(z=new mxRectangle(z.x,z.y,z.width,z.height),z.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(z.x+(z.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=
-Math.round(z.y+z.height+Editor.hintOffset)+"px"}};var Za=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){Za.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Na=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Na.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),
-this.changeHandler=null)}}();(function(){function b(c,l,v){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=v?v:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function m(){mxCylinder.call(this)}function C(){mxCylinder.call(this)}function p(){mxActor.call(this)}function F(){mxCylinder.call(this)}function L(){mxCylinder.call(this)}function P(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxShape.call(this)}function g(){mxShape.call(this)}
-function x(c,l,v,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=v;this.strokewidth=null!=n?n:1}function y(){mxActor.call(this)}function t(){mxCylinder.call(this)}function G(){mxCylinder.call(this)}function D(){mxActor.call(this)}function I(){mxActor.call(this)}function H(){mxActor.call(this)}function S(){mxActor.call(this)}function T(){mxActor.call(this)}function M(){mxActor.call(this)}function fa(){mxActor.call(this)}function la(c,l){this.canvas=c;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");
-this.defaultVariation=l;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,la.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,la.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,la.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,la.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,la.prototype.curveTo);
-this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,la.prototype.arcTo)}function ra(){mxRectangleShape.call(this)}function ba(){mxRectangleShape.call(this)}function oa(){mxActor.call(this)}function na(){mxActor.call(this)}function N(){mxActor.call(this)}function aa(){mxRectangleShape.call(this)}function V(){mxRectangleShape.call(this)}function ha(){mxCylinder.call(this)}function X(){mxShape.call(this)}function ia(){mxShape.call(this)}function q(){mxEllipse.call(this)}function E(){mxShape.call(this)}
-function Q(){mxShape.call(this)}function Y(){mxRectangleShape.call(this)}function R(){mxShape.call(this)}function Z(){mxShape.call(this)}function da(){mxShape.call(this)}function qa(){mxShape.call(this)}function va(){mxShape.call(this)}function ja(){mxCylinder.call(this)}function sa(){mxCylinder.call(this)}function ya(){mxRectangleShape.call(this)}function Aa(){mxDoubleEllipse.call(this)}function Ea(){mxDoubleEllipse.call(this)}function za(){mxArrowConnector.call(this);this.spacing=0}function Ia(){mxArrowConnector.call(this);
-this.spacing=0}function Ca(){mxActor.call(this)}function Sa(){mxRectangleShape.call(this)}function Pa(){mxActor.call(this)}function Ta(){mxActor.call(this)}function Za(){mxActor.call(this)}function Na(){mxActor.call(this)}function z(){mxActor.call(this)}function J(){mxActor.call(this)}function O(){mxActor.call(this)}function U(){mxActor.call(this)}function W(){mxActor.call(this)}function ea(){mxActor.call(this)}function ka(){mxEllipse.call(this)}function xa(){mxEllipse.call(this)}function ta(){mxEllipse.call(this)}
-function pa(){mxRhombus.call(this)}function ua(){mxEllipse.call(this)}function Da(){mxEllipse.call(this)}function Fa(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function Qa(){mxActor.call(this)}function Ba(){mxActor.call(this)}function Ka(){mxActor.call(this)}function Oa(c,l,v,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=v;this.strokewidth=null!=n?n:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function Ya(){mxConnector.call(this)}
-function db(c,l,v,n,u,A,B,ca,K,wa){B+=K;var ma=n.clone();n.x-=u*(2*B+K);n.y-=A*(2*B+K);u*=B+K;A*=B+K;return function(){c.ellipse(ma.x-u-B,ma.y-A-B,2*B,2*B);wa?c.fillAndStroke():c.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var l=0;l<this.line.length;l++){var v=this.line[l];null!=v&&(v=new mxRectangle(v.x,v.y,this.strokewidth,this.strokewidth),null==c?c=v:c.add(v))}this.bounds=null!=c?c:new mxRectangle};b.prototype.paintVertexShape=
-function(c,l,v,n,u){this.paintTableLine(c,this.line,0,0)};b.prototype.paintTableLine=function(c,l,v,n){if(null!=l){var u=null;c.begin();for(var A=0;A<l.length;A++){var B=l[A];null!=B&&(null==u?c.moveTo(B.x+v,B.y+n):null!=u&&c.lineTo(B.x+v,B.y+n));u=B}c.end();c.stroke()}};b.prototype.intersectsRectangle=function(c){var l=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var v=null,n=0;n<this.line.length&&!l;n++){var u=this.line[n];null!=u&&null!=v&&(l=mxUtils.rectangleIntersectsSegment(c,
-v,u));v=u}return l};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(e,mxSwimlane);e.prototype.getLabelBounds=function(c){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};e.prototype.paintVertexShape=function(c,l,v,n,u){var A=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):!1,B=this.isHorizontal(),ca=this.getTitleSize();0==ca||this.outline?Fa.prototype.paintVertexShape.apply(this,
-arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-l,-v));A||this.outline||!(B&&ca<u||!B&&ca<n)||this.paintForeground(c,l,v,n,u)};e.prototype.paintForeground=function(c,l,v,n,u){if(null!=this.state){var A=this.flipH,B=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var ca=A;A=B;B=ca}c.rotate(-this.getShapeRotation(),A,B,l+n/2,v+u/2);s=this.scale;l=this.bounds.x/s;v=this.bounds.y/s;n=this.bounds.width/s;u=this.bounds.height/
-s;this.paintTableForeground(c,l,v,n,u)}};e.prototype.paintTableForeground=function(c,l,v,n,u){n=this.state.view.graph.getTableLines(this.state.cell,"0"!=mxUtils.getValue(this.state.style,"rowLines","1"),"0"!=mxUtils.getValue(this.state.style,"columnLines","1"));for(u=0;u<n.length;u++)b.prototype.paintTableLine(c,n[u],l,v)};e.prototype.configurePointerEvents=function(c){0==this.getTitleSize()?c.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",
-e);mxUtils.extend(k,e);k.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",k);mxUtils.extend(m,mxCylinder);m.prototype.size=20;m.prototype.darkOpacity=0;m.prototype.darkOpacity2=0;m.prototype.paintVertexShape=function(c,l,v,n,u){var A=Math.max(0,Math.min(n,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),B=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),ca=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"darkOpacity2",this.darkOpacity2))));c.translate(l,v);c.begin();c.moveTo(0,0);c.lineTo(n-A,0);c.lineTo(n,A);c.lineTo(n,u);c.lineTo(A,u);c.lineTo(0,u-A);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(n-A,0),c.lineTo(n,A),c.lineTo(A,A),c.close(),c.fill()),0!=ca&&(c.setFillAlpha(Math.abs(ca)),c.setFillColor(0>ca?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(A,
-A),c.lineTo(A,u),c.lineTo(0,u-A),c.close(),c.fill()),c.begin(),c.moveTo(A,u),c.lineTo(A,A),c.lineTo(0,0),c.moveTo(A,A),c.lineTo(n,A),c.end(),c.stroke())};m.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?(c=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(c,c,0,0)):null};mxCellRenderer.registerShape("cube",m);var eb=Math.tan(mxUtils.toRadians(30)),cb=(.5-eb)/2;mxCellRenderer.registerShape("isoRectangle",p);mxUtils.extend(C,
-mxCylinder);C.prototype.size=6;C.prototype.paintVertexShape=function(c,l,v,n,u){c.setFillColor(this.stroke);var A=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(l+.5*(n-A),v+.5*(u-A),A,A);c.fill();c.setFillColor(mxConstants.NONE);c.rect(l,v,n,u);c.fill()};mxCellRenderer.registerShape("waypoint",C);mxUtils.extend(p,mxActor);p.prototype.size=20;p.prototype.redrawPath=function(c,l,v,n,u){l=Math.min(n,u/eb);c.translate((n-l)/2,(u-l)/2+l/4);c.moveTo(0,
-.25*l);c.lineTo(.5*l,l*cb);c.lineTo(l,.25*l);c.lineTo(.5*l,(.5-cb)*l);c.lineTo(0,.25*l);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",p);mxUtils.extend(F,mxCylinder);F.prototype.size=20;F.prototype.redrawPath=function(c,l,v,n,u,A){l=Math.min(n,u/(.5+eb));A?(c.moveTo(0,.25*l),c.lineTo(.5*l,(.5-cb)*l),c.lineTo(l,.25*l),c.moveTo(.5*l,(.5-cb)*l),c.lineTo(.5*l,(1-cb)*l)):(c.translate((n-l)/2,(u-l)/2),c.moveTo(0,.25*l),c.lineTo(.5*l,l*cb),c.lineTo(l,.25*l),c.lineTo(l,.75*l),c.lineTo(.5*
-l,(1-cb)*l),c.lineTo(0,.75*l),c.close());c.end()};mxCellRenderer.registerShape("isoCube",F);mxUtils.extend(L,mxCylinder);L.prototype.redrawPath=function(c,l,v,n,u,A){l=Math.min(u/2,Math.round(u/8)+this.strokewidth-1);if(A&&null!=this.fill||!A&&null==this.fill)c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),A||(c.stroke(),c.begin()),c.translate(0,
--l);A||(c.moveTo(0,l),c.curveTo(0,-l/3,n,-l/3,n,l),c.lineTo(n,u-l),c.curveTo(n,u+l/3,0,u+l/3,0,u-l),c.close())};L.prototype.getLabelMargins=function(c){return new mxRectangle(0,2.5*Math.min(c.height/2,Math.round(c.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",L);mxUtils.extend(P,mxCylinder);P.prototype.size=30;P.prototype.darkOpacity=0;P.prototype.paintVertexShape=function(c,l,v,n,u){var A=Math.max(0,Math.min(n,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",
-this.size))))),B=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));c.translate(l,v);c.begin();c.moveTo(0,0);c.lineTo(n-A,0);c.lineTo(n,A);c.lineTo(n,u);c.lineTo(0,u);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(n-A,0),c.lineTo(n-A,A),c.lineTo(n,A),c.close(),c.fill()),c.begin(),c.moveTo(n-A,0),c.lineTo(n-A,A),c.lineTo(n,A),
-c.end(),c.stroke())};mxCellRenderer.registerShape("note",P);mxUtils.extend(d,P);mxCellRenderer.registerShape("note2",d);d.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,0)}return null};mxUtils.extend(f,mxShape);f.prototype.isoAngle=15;f.prototype.paintVertexShape=function(c,l,v,n,u){var A=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,
-"isoAngle",this.isoAngle))))*Math.PI/200;A=Math.min(n*Math.tan(A),.5*u);c.translate(l,v);c.begin();c.moveTo(.5*n,0);c.lineTo(n,A);c.lineTo(n,u-A);c.lineTo(.5*n,u);c.lineTo(0,u-A);c.lineTo(0,A);c.close();c.fillAndStroke();c.setShadow(!1);c.begin();c.moveTo(0,A);c.lineTo(.5*n,2*A);c.lineTo(n,A);c.moveTo(.5*n,2*A);c.lineTo(.5*n,u);c.stroke()};mxCellRenderer.registerShape("isoCube2",f);mxUtils.extend(g,mxShape);g.prototype.size=15;g.prototype.paintVertexShape=function(c,l,v,n,u){var A=Math.max(0,Math.min(.5*
-u,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(l,v);0==A?(c.rect(0,0,n,u),c.fillAndStroke()):(c.begin(),c.moveTo(0,A),c.arcTo(.5*n,A,0,0,1,.5*n,0),c.arcTo(.5*n,A,0,0,1,n,A),c.lineTo(n,u-A),c.arcTo(.5*n,A,0,0,1,.5*n,u),c.arcTo(.5*n,A,0,0,1,0,u-A),c.close(),c.fillAndStroke(),c.setShadow(!1),c.begin(),c.moveTo(n,A),c.arcTo(.5*n,A,0,0,1,.5*n,2*A),c.arcTo(.5*n,A,0,0,1,0,A),c.stroke())};mxCellRenderer.registerShape("cylinder2",g);mxUtils.extend(x,mxCylinder);x.prototype.size=
-15;x.prototype.paintVertexShape=function(c,l,v,n,u){var A=Math.max(0,Math.min(.5*u,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),B=mxUtils.getValue(this.style,"lid",!0);c.translate(l,v);0==A?(c.rect(0,0,n,u),c.fillAndStroke()):(c.begin(),B?(c.moveTo(0,A),c.arcTo(.5*n,A,0,0,1,.5*n,0),c.arcTo(.5*n,A,0,0,1,n,A)):(c.moveTo(0,0),c.arcTo(.5*n,A,0,0,0,.5*n,A),c.arcTo(.5*n,A,0,0,0,n,0)),c.lineTo(n,u-A),c.arcTo(.5*n,A,0,0,1,.5*n,u),c.arcTo(.5*n,A,0,0,1,0,u-A),c.close(),c.fillAndStroke(),c.setShadow(!1),
-B&&(c.begin(),c.moveTo(n,A),c.arcTo(.5*n,A,0,0,1,.5*n,2*A),c.arcTo(.5*n,A,0,0,1,0,A),c.stroke()))};mxCellRenderer.registerShape("cylinder3",x);mxUtils.extend(y,mxActor);y.prototype.redrawPath=function(c,l,v,n,u){c.moveTo(0,0);c.quadTo(n/2,.5*u,n,0);c.quadTo(.5*n,u/2,n,u);c.quadTo(n/2,.5*u,0,u);c.quadTo(.5*n,u/2,0,0);c.end()};mxCellRenderer.registerShape("switch",y);mxUtils.extend(t,mxCylinder);t.prototype.tabWidth=60;t.prototype.tabHeight=20;t.prototype.tabPosition="right";t.prototype.arcSize=.1;
-t.prototype.paintVertexShape=function(c,l,v,n,u){c.translate(l,v);l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));v=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var A=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),B=mxUtils.getValue(this.style,"rounded",!1),ca=mxUtils.getValue(this.style,"absoluteArcSize",!1),K=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));ca||(K*=Math.min(n,u));
-K=Math.min(K,.5*n,.5*(u-v));l=Math.max(l,K);l=Math.min(n-K,l);B||(K=0);c.begin();"left"==A?(c.moveTo(Math.max(K,0),v),c.lineTo(Math.max(K,0),0),c.lineTo(l,0),c.lineTo(l,v)):(c.moveTo(n-l,v),c.lineTo(n-l,0),c.lineTo(n-Math.max(K,0),0),c.lineTo(n-Math.max(K,0),v));B?(c.moveTo(0,K+v),c.arcTo(K,K,0,0,1,K,v),c.lineTo(n-K,v),c.arcTo(K,K,0,0,1,n,K+v),c.lineTo(n,u-K),c.arcTo(K,K,0,0,1,n-K,u),c.lineTo(K,u),c.arcTo(K,K,0,0,1,0,u-K)):(c.moveTo(0,v),c.lineTo(n,v),c.lineTo(n,u),c.lineTo(0,u));c.close();c.fillAndStroke();
-c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c.begin(),c.moveTo(n-30,v+20),c.lineTo(n-20,v+10),c.lineTo(n-10,v+20),c.close(),c.stroke())};mxCellRenderer.registerShape("folder",t);t.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var v=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,
-"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),u=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));u||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-l));n||(A=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-v),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-v),0,A,Math.min(c.height,c.height-
-l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};mxUtils.extend(G,mxCylinder);G.prototype.arcSize=.1;G.prototype.paintVertexShape=function(c,l,v,n,u){c.translate(l,v);var A=mxUtils.getValue(this.style,"rounded",!1),B=mxUtils.getValue(this.style,"absoluteArcSize",!1);l=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v=mxUtils.getValue(this.style,"umlStateConnection",null);B||(l*=Math.min(n,u));l=Math.min(l,.5*n,.5*u);A||(l=0);A=0;null!=v&&(A=10);c.begin();c.moveTo(A,
-l);c.arcTo(l,l,0,0,1,A+l,0);c.lineTo(n-l,0);c.arcTo(l,l,0,0,1,n,l);c.lineTo(n,u-l);c.arcTo(l,l,0,0,1,n-l,u);c.lineTo(A+l,u);c.arcTo(l,l,0,0,1,A,u-l);c.close();c.fillAndStroke();c.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(c.roundrect(n-40,u-20,10,10,3,3),c.stroke(),c.roundrect(n-20,u-20,10,10,3,3),c.stroke(),c.begin(),c.moveTo(n-30,u-15),c.lineTo(n-20,u-15),c.stroke());"connPointRefEntry"==v?(c.ellipse(0,.5*u-10,20,20),c.fillAndStroke()):"connPointRefExit"==
-v&&(c.ellipse(0,.5*u-10,20,20),c.fillAndStroke(),c.begin(),c.moveTo(5,.5*u-5),c.lineTo(15,.5*u+5),c.moveTo(15,.5*u-5),c.lineTo(5,.5*u+5),c.stroke())};G.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",G);mxUtils.extend(D,mxActor);D.prototype.size=30;D.prototype.isRoundable=function(){return!0};D.prototype.redrawPath=
-function(c,l,v,n,u){l=Math.max(0,Math.min(n,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(n,0),new mxPoint(n,u),new mxPoint(0,u),new mxPoint(0,l)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("card",D);mxUtils.extend(I,mxActor);I.prototype.size=.4;I.prototype.redrawPath=function(c,l,v,n,u){l=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));c.moveTo(0,l/2);c.quadTo(n/4,1.4*l,n/2,l/2);c.quadTo(3*n/4,l*(1-1.4),n,l/2);c.lineTo(n,u-l/2);c.quadTo(3*n/4,u-1.4*l,n/2,u-l/2);c.quadTo(n/4,u-l*(1-1.4),0,u-l/2);c.lineTo(0,l/2);c.close();c.end()};I.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",this.size),v=c.width,n=c.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return l*=
-n,new mxRectangle(c.x,c.y+l,v,n-2*l);l*=v;return new mxRectangle(c.x+l,c.y,v-2*l,n)}return c};mxCellRenderer.registerShape("tape",I);mxUtils.extend(H,mxActor);H.prototype.size=.3;H.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};H.prototype.redrawPath=function(c,l,v,n,u){l=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,
-0);c.lineTo(n,0);c.lineTo(n,u-l/2);c.quadTo(3*n/4,u-1.4*l,n/2,u-l/2);c.quadTo(n/4,u-l*(1-1.4),0,u-l/2);c.lineTo(0,l/2);c.close();c.end()};mxCellRenderer.registerShape("document",H);var ub=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,l,v,n){var u=mxUtils.getValue(this.style,"size");return null!=u?n*Math.max(0,Math.min(1,u)):ub.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=2*mxUtils.getValue(this.style,
-"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,c.height*l),0,0)}return null};x.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(l/=2);return new mxRectangle(0,Math.min(c.height*this.scale,2*l*this.scale),0,Math.max(0,.3*l*this.scale))}return null};t.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,
-"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var v=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),u=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));u||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-l));n||(A=0);return"left"==mxUtils.getValue(this.style,"tabPosition",
-this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-v),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-v),0,A,Math.min(c.height,c.height-l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};G.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};d.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,
-"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,Math.max(0,l*this.scale))}return null};mxUtils.extend(S,mxActor);S.prototype.size=.2;S.prototype.fixedSize=20;S.prototype.isRoundable=function(){return!0};S.prototype.redrawPath=function(c,l,v,n,u){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,u),new mxPoint(l,0),new mxPoint(n,0),new mxPoint(n-l,u)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("parallelogram",S);mxUtils.extend(T,mxActor);T.prototype.size=.2;T.prototype.fixedSize=20;T.prototype.isRoundable=function(){return!0};T.prototype.redrawPath=function(c,l,v,n,u){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*
-n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,u),new mxPoint(l,0),new mxPoint(n-l,0),new mxPoint(n,u)],this.isRounded,v,!0)};mxCellRenderer.registerShape("trapezoid",T);mxUtils.extend(M,mxActor);M.prototype.size=.5;M.prototype.redrawPath=function(c,l,v,n,u){c.setFillColor(null);
-l=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(n,0),new mxPoint(l,0),new mxPoint(l,u/2),new mxPoint(0,u/2),new mxPoint(l,u/2),new mxPoint(l,u),new mxPoint(n,u)],this.isRounded,v,!1);c.end()};mxCellRenderer.registerShape("curlyBracket",M);mxUtils.extend(fa,mxActor);fa.prototype.redrawPath=function(c,l,v,n,u){c.setStrokeWidth(1);c.setFillColor(this.stroke);
-l=n/5;c.rect(0,0,l,u);c.fillAndStroke();c.rect(2*l,0,l,u);c.fillAndStroke();c.rect(4*l,0,l,u);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",fa);la.prototype.moveTo=function(c,l){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;this.firstX=c;this.firstY=l};la.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)};
-la.prototype.quadTo=function(c,l,v,n){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=n};la.prototype.curveTo=function(c,l,v,n,u,A){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=u;this.lastY=A};la.prototype.arcTo=function(c,l,v,n,u,A,B){this.originalArcTo.apply(this.canvas,arguments);this.lastX=A;this.lastY=B};la.prototype.lineTo=function(c,l){if(null!=this.lastX&&null!=this.lastY){var v=function(ma){return"number"===typeof ma?ma?0>ma?-1:1:ma===ma?0:NaN:NaN},
-n=Math.abs(c-this.lastX),u=Math.abs(l-this.lastY),A=Math.sqrt(n*n+u*u);if(2>A){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;return}var B=Math.round(A/10),ca=this.defaultVariation;5>B&&(B=5,ca/=3);var K=v(c-this.lastX)*n/B;v=v(l-this.lastY)*u/B;n/=A;u/=A;for(A=0;A<B;A++){var wa=(Math.random()-.5)*ca;this.originalLineTo.call(this.canvas,K*A+this.lastX-wa*u,v*A+this.lastY-wa*n)}this.originalLineTo.call(this.canvas,c,l)}else this.originalLineTo.apply(this.canvas,arguments);
-this.lastX=c;this.lastY=l};la.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};mxShape.prototype.defaultJiggle=1.5;var fb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(c){fb.apply(this,arguments);null==c.handJiggle&&(c.handJiggle=this.createHandJiggle(c))};var pb=mxShape.prototype.afterPaint;
-mxShape.prototype.afterPaint=function(c){pb.apply(this,arguments);null!=c.handJiggle&&(c.handJiggle.destroy(),delete c.handJiggle)};mxShape.prototype.createComicCanvas=function(c){return new la(c,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(c){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(c)};mxRhombus.prototype.defaultJiggle=2;var lb=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"))&&lb.apply(this,arguments)};var $a=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(c,l,v,n,u){if(null==c.handJiggle||c.handJiggle.constructor!=la)$a.apply(this,arguments);else{var A=!0;null!=this.style&&(A="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,
+(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),H.consume()}};var S=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);S.apply(this,arguments)};var ba=(new Date).getTime(),U=0,ca=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(x,H,P,X){ca.apply(this,arguments);P!=this.currentTerminalState?(ba=(new Date).getTime(),
+U=0):U=(new Date).getTime()-ba;this.currentTerminalState=P};var ea=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(x){return mxEvent.isShiftDown(x.getEvent())&&mxEvent.isAltDown(x.getEvent())?!1:null!=this.currentTerminalState&&x.getState()==this.currentTerminalState&&2E3<U||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&ea.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=
+function(x,H,P){H=null!=x&&0==x;var X=this.state.getVisibleTerminalState(H);x=null!=x&&(0==x||x>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==x)?this.graph.getConnectionConstraint(this.state,X,H):null;P=null!=(null!=x?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(H),x):null)?P?this.endFixedHandleImage:this.fixedHandleImage:null!=x&&null!=X?P?this.endTerminalHandleImage:this.terminalHandleImage:P?this.endHandleImage:this.handleImage;if(null!=P)return P=
+new mxImageShape(new mxRectangle(0,0,P.width,P.height),P.src),P.preserveImageAspect=!1,P;P=mxConstants.HANDLE_SIZE;this.preferHtml&&--P;return new mxRectangleShape(new mxRectangle(0,0,P,P),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var na=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(x,H,P){this.handleImage=H==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:H==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;
+return na.apply(this,arguments)};var ra=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(x){if(null!=x&&1==x.length){var H=this.graph.getModel(),P=H.getParent(x[0]),X=this.graph.getCellGeometry(x[0]);if(H.isEdge(P)&&null!=X&&X.relative&&(H=this.graph.view.getState(x[0]),null!=H&&2>H.width&&2>H.height&&null!=H.text&&null!=H.text.boundingBox))return mxRectangle.fromRectangle(H.text.boundingBox)}return ra.apply(this,arguments)};var ya=mxGraphHandler.prototype.getGuideStates;
+mxGraphHandler.prototype.getGuideStates=function(){for(var x=ya.apply(this,arguments),H=[],P=0;P<x.length;P++)"1"!=mxUtils.getValue(x[P].style,"part","0")&&H.push(x[P]);return H};var va=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(x){var H=this.graph.getModel(),P=H.getParent(x.cell),X=this.graph.getCellGeometry(x.cell);return H.isEdge(P)&&null!=X&&X.relative&&2>x.width&&2>x.height&&null!=x.text&&null!=x.text.boundingBox?(H=x.text.unrotatedBoundingBox||
+x.text.boundingBox,new mxRectangle(Math.round(H.x),Math.round(H.y),Math.round(H.width),Math.round(H.height))):va.apply(this,arguments)};var Da=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(x,H){var P=this.graph.getModel(),X=P.getParent(this.state.cell),Z=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(H)==mxEvent.ROTATION_HANDLE||!P.isEdge(X)||null==Z||!Z.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&Da.apply(this,arguments)};
+mxVertexHandler.prototype.rotateClick=function(){var x=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),H=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&x==mxConstants.NONE&&H==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 pa=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(x,H){pa.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var Aa=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(x,H){Aa.apply(this,arguments);null!=this.rotationShape&&null!=
+this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="");this.blockDelayedSelection=null};var xa=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){xa.apply(this,arguments);var x=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles();
+else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var H=0;4>H;H++){var P=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);P.dialect=mxConstants.DIALECT_SVG;P.init(this.graph.view.getOverlayPane());this.cornerHandles.push(P)}}var X=mxUtils.bind(this,function(){null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<
+this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(Z,fa){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));X()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(Z,fa){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);
+H=this.graph.getLinkForCell(this.state.cell);P=this.graph.getLinksForState(this.state);this.updateLinkHint(H,P);if(null!=H||null!=P&&0<P.length)x=!0;x&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(x,H){try{if(null==x&&(null==H||0==H.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=x||null!=H&&0<H.length){null==this.linkHint&&(this.linkHint=b(),this.linkHint.style.padding=
+"6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=x&&(this.linkHint.appendChild(this.graph.createLinkForHint(x)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var P=document.createElement("img");P.className="geAdaptiveAsset";P.setAttribute("src",Editor.editImage);
+P.setAttribute("title",mxResources.get("editLink"));P.setAttribute("width","11");P.setAttribute("height","11");P.style.marginLeft="10px";P.style.marginBottom="-1px";P.style.cursor="pointer";this.linkHint.appendChild(P);mxEvent.addListener(P,"click",mxUtils.bind(this,function(fa){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(fa)}));var X=P.cloneNode(!0);X.setAttribute("src",Editor.trashImage);X.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));
+X.style.marginLeft="4px";this.linkHint.appendChild(X);mxEvent.addListener(X,"click",mxUtils.bind(this,function(fa){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(fa)}))}if(null!=H)for(P=0;P<H.length;P++){var Z=document.createElement("div");Z.style.marginTop=null!=x||0<P?"6px":"0px";Z.appendChild(this.graph.createLinkForHint(H[P].getAttribute("href"),mxUtils.getTextContent(H[P])));this.linkHint.appendChild(Z)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(fa){}};mxEdgeHandler.prototype.updateLinkHint=
+mxVertexHandler.prototype.updateLinkHint;var Ma=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){Ma.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var x=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<
+this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(X,Z){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));x();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var H=this.graph.getLinkForCell(this.state.cell),P=this.graph.getLinksForState(this.state);if(null!=H||null!=P&&0<P.length)this.updateLinkHint(H,
+P),this.redrawHandles()};var Oa=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Oa.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Na=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var x=0;x<this.moveHandles.length;x++)this.moveHandles[x].style.left=this.moveHandles[x].rowState.x+this.moveHandles[x].rowState.width-
+5+"px",this.moveHandles[x].style.top=this.moveHandles[x].rowState.y+this.moveHandles[x].rowState.height/2-6+"px";if(null!=this.cornerHandles){x=this.getSelectionBorderInset();var H=this.cornerHandles,P=H[0].bounds.height/2;H[0].bounds.x=this.state.x-H[0].bounds.width/2+x;H[0].bounds.y=this.state.y-P+x;H[0].redraw();H[1].bounds.x=H[0].bounds.x+this.state.width-2*x;H[1].bounds.y=H[0].bounds.y;H[1].redraw();H[2].bounds.x=H[0].bounds.x;H[2].bounds.y=this.state.y+this.state.height-2*x;H[2].redraw();H[3].bounds.x=
+H[1].bounds.x;H[3].bounds.y=H[2].bounds.y;H[3].redraw();for(x=0;x<this.cornerHandles.length;x++)this.cornerHandles[x].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Na.apply(this);null!=this.state&&null!=this.linkHint&&(x=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),
+H=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),P=mxUtils.getBoundingBox(H,this.state.style[mxConstants.STYLE_ROTATION]||"0",x),x=null!=P?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,H=null!=this.state.text?this.state.text.boundingBox:null,null==P&&(P=this.state),P=P.y+P.height,null!=H&&(P=Math.max(P,H.y+H.height)),this.linkHint.style.left=Math.max(0,Math.round(x.x+(x.width-this.linkHint.clientWidth)/2))+"px",
+this.linkHint.style.top=Math.round(P+this.verticalOffset/2+Editor.hintOffset)+"px")};var La=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){La.apply(this,arguments);if(null!=this.moveHandles){for(var x=0;x<this.moveHandles.length;x++)null!=this.moveHandles[x]&&null!=this.moveHandles[x].parentNode&&this.moveHandles[x].parentNode.removeChild(this.moveHandles[x]);this.moveHandles=null}if(null!=this.cornerHandles){for(x=0;x<this.cornerHandles.length;x++)null!=this.cornerHandles[x]&&
+null!=this.cornerHandles[x].node&&null!=this.cornerHandles[x].node.parentNode&&this.cornerHandles[x].node.parentNode.removeChild(this.cornerHandles[x].node);this.cornerHandles=null}null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&
+(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var Ba=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Ba.apply(this),null!=this.state&&null!=this.linkHint)){var x=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(x=new mxRectangle(x.x,x.y,x.width,x.height),x.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(x.x+(x.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=
+Math.round(x.y+x.height+Editor.hintOffset)+"px"}};var ab=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){ab.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Xa=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Xa.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),
+this.changeHandler=null)}}();(function(){function b(c,m,v){mxShape.call(this);this.line=c;this.stroke=m;this.strokewidth=null!=v?v:1;this.updateBoundsFromLine()}function d(){mxSwimlane.call(this)}function g(){mxSwimlane.call(this)}function l(){mxCylinder.call(this)}function D(){mxCylinder.call(this)}function p(){mxActor.call(this)}function E(){mxCylinder.call(this)}function N(){mxCylinder.call(this)}function R(){mxCylinder.call(this)}function G(){mxCylinder.call(this)}function M(){mxShape.call(this)}function Q(){mxShape.call(this)}
+function e(c,m,v,n){mxShape.call(this);this.bounds=c;this.fill=m;this.stroke=v;this.strokewidth=null!=n?n:1}function f(){mxActor.call(this)}function k(){mxCylinder.call(this)}function z(){mxCylinder.call(this)}function t(){mxActor.call(this)}function B(){mxActor.call(this)}function I(){mxActor.call(this)}function O(){mxActor.call(this)}function J(){mxActor.call(this)}function y(){mxActor.call(this)}function ia(){mxActor.call(this)}function da(c,m){this.canvas=c;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");
+this.defaultVariation=m;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,da.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,da.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,da.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,da.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,da.prototype.curveTo);
+this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,da.prototype.arcTo)}function ja(){mxRectangleShape.call(this)}function aa(){mxRectangleShape.call(this)}function qa(){mxActor.call(this)}function sa(){mxActor.call(this)}function L(){mxActor.call(this)}function V(){mxRectangleShape.call(this)}function T(){mxRectangleShape.call(this)}function Y(){mxCylinder.call(this)}function W(){mxShape.call(this)}function ka(){mxShape.call(this)}function q(){mxEllipse.call(this)}function F(){mxShape.call(this)}
+function S(){mxShape.call(this)}function ba(){mxRectangleShape.call(this)}function U(){mxShape.call(this)}function ca(){mxShape.call(this)}function ea(){mxShape.call(this)}function na(){mxShape.call(this)}function ra(){mxShape.call(this)}function ya(){mxCylinder.call(this)}function va(){mxCylinder.call(this)}function Da(){mxRectangleShape.call(this)}function pa(){mxDoubleEllipse.call(this)}function Aa(){mxDoubleEllipse.call(this)}function xa(){mxArrowConnector.call(this);this.spacing=0}function Ma(){mxArrowConnector.call(this);
+this.spacing=0}function Oa(){mxActor.call(this)}function Na(){mxRectangleShape.call(this)}function La(){mxActor.call(this)}function Ba(){mxActor.call(this)}function ab(){mxActor.call(this)}function Xa(){mxActor.call(this)}function x(){mxActor.call(this)}function H(){mxActor.call(this)}function P(){mxActor.call(this)}function X(){mxActor.call(this)}function Z(){mxActor.call(this)}function fa(){mxActor.call(this)}function la(){mxEllipse.call(this)}function za(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}
+function oa(){mxRhombus.call(this)}function ta(){mxEllipse.call(this)}function Ea(){mxEllipse.call(this)}function Fa(){mxEllipse.call(this)}function Pa(){mxEllipse.call(this)}function Ra(){mxActor.call(this)}function Ca(){mxActor.call(this)}function Ja(){mxActor.call(this)}function Qa(c,m,v,n){mxShape.call(this);this.bounds=c;this.fill=m;this.stroke=v;this.strokewidth=null!=n?n:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function $a(){mxConnector.call(this)}
+function eb(c,m,v,n,u,A,C,ha,K,wa){C+=K;var ma=n.clone();n.x-=u*(2*C+K);n.y-=A*(2*C+K);u*=C+K;A*=C+K;return function(){c.ellipse(ma.x-u-C,ma.y-A-C,2*C,2*C);wa?c.fillAndStroke():c.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var m=0;m<this.line.length;m++){var v=this.line[m];null!=v&&(v=new mxRectangle(v.x,v.y,this.strokewidth,this.strokewidth),null==c?c=v:c.add(v))}this.bounds=null!=c?c:new mxRectangle};b.prototype.paintVertexShape=
+function(c,m,v,n,u){this.paintTableLine(c,this.line,0,0)};b.prototype.paintTableLine=function(c,m,v,n){if(null!=m){var u=null;c.begin();for(var A=0;A<m.length;A++){var C=m[A];null!=C&&(null==u?c.moveTo(C.x+v,C.y+n):null!=u&&c.lineTo(C.x+v,C.y+n));u=C}c.end();c.stroke()}};b.prototype.intersectsRectangle=function(c){var m=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var v=null,n=0;n<this.line.length&&!m;n++){var u=this.line[n];null!=u&&null!=v&&(m=mxUtils.rectangleIntersectsSegment(c,
+v,u));v=u}return m};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(d,mxSwimlane);d.prototype.getLabelBounds=function(c){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};d.prototype.paintVertexShape=function(c,m,v,n,u){var A=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):!1,C=this.isHorizontal(),ha=this.getTitleSize();0==ha||this.outline?Fa.prototype.paintVertexShape.apply(this,
+arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-m,-v));A||this.outline||!(C&&ha<u||!C&&ha<n)||this.paintForeground(c,m,v,n,u)};d.prototype.paintForeground=function(c,m,v,n,u){if(null!=this.state){var A=this.flipH,C=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var ha=A;A=C;C=ha}c.rotate(-this.getShapeRotation(),A,C,m+n/2,v+u/2);s=this.scale;m=this.bounds.x/s;v=this.bounds.y/s;n=this.bounds.width/s;u=this.bounds.height/
+s;this.paintTableForeground(c,m,v,n,u)}};d.prototype.paintTableForeground=function(c,m,v,n,u){n=this.state.view.graph.getTableLines(this.state.cell,"0"!=mxUtils.getValue(this.state.style,"rowLines","1"),"0"!=mxUtils.getValue(this.state.style,"columnLines","1"));for(u=0;u<n.length;u++)b.prototype.paintTableLine(c,n[u],m,v)};d.prototype.configurePointerEvents=function(c){0==this.getTitleSize()?c.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",
+d);mxUtils.extend(g,d);g.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",g);mxUtils.extend(l,mxCylinder);l.prototype.size=20;l.prototype.darkOpacity=0;l.prototype.darkOpacity2=0;l.prototype.paintVertexShape=function(c,m,v,n,u){var A=Math.max(0,Math.min(n,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),C=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),ha=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"darkOpacity2",this.darkOpacity2))));c.translate(m,v);c.begin();c.moveTo(0,0);c.lineTo(n-A,0);c.lineTo(n,A);c.lineTo(n,u);c.lineTo(A,u);c.lineTo(0,u-A);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=C&&(c.setFillAlpha(Math.abs(C)),c.setFillColor(0>C?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(n-A,0),c.lineTo(n,A),c.lineTo(A,A),c.close(),c.fill()),0!=ha&&(c.setFillAlpha(Math.abs(ha)),c.setFillColor(0>ha?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(A,
+A),c.lineTo(A,u),c.lineTo(0,u-A),c.close(),c.fill()),c.begin(),c.moveTo(A,u),c.lineTo(A,A),c.lineTo(0,0),c.moveTo(A,A),c.lineTo(n,A),c.end(),c.stroke())};l.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?(c=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(c,c,0,0)):null};mxCellRenderer.registerShape("cube",l);var cb=Math.tan(mxUtils.toRadians(30)),db=(.5-cb)/2;mxCellRenderer.registerShape("isoRectangle",p);mxUtils.extend(D,
+mxCylinder);D.prototype.size=6;D.prototype.paintVertexShape=function(c,m,v,n,u){c.setFillColor(this.stroke);var A=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(m+.5*(n-A),v+.5*(u-A),A,A);c.fill();c.setFillColor(mxConstants.NONE);c.rect(m,v,n,u);c.fill()};mxCellRenderer.registerShape("waypoint",D);mxUtils.extend(p,mxActor);p.prototype.size=20;p.prototype.redrawPath=function(c,m,v,n,u){m=Math.min(n,u/cb);c.translate((n-m)/2,(u-m)/2+m/4);c.moveTo(0,
+.25*m);c.lineTo(.5*m,m*db);c.lineTo(m,.25*m);c.lineTo(.5*m,(.5-db)*m);c.lineTo(0,.25*m);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",p);mxUtils.extend(E,mxCylinder);E.prototype.size=20;E.prototype.redrawPath=function(c,m,v,n,u,A){m=Math.min(n,u/(.5+cb));A?(c.moveTo(0,.25*m),c.lineTo(.5*m,(.5-db)*m),c.lineTo(m,.25*m),c.moveTo(.5*m,(.5-db)*m),c.lineTo(.5*m,(1-db)*m)):(c.translate((n-m)/2,(u-m)/2),c.moveTo(0,.25*m),c.lineTo(.5*m,m*db),c.lineTo(m,.25*m),c.lineTo(m,.75*m),c.lineTo(.5*
+m,(1-db)*m),c.lineTo(0,.75*m),c.close());c.end()};mxCellRenderer.registerShape("isoCube",E);mxUtils.extend(N,mxCylinder);N.prototype.redrawPath=function(c,m,v,n,u,A){m=Math.min(u/2,Math.round(u/8)+this.strokewidth-1);if(A&&null!=this.fill||!A&&null==this.fill)c.moveTo(0,m),c.curveTo(0,2*m,n,2*m,n,m),A||(c.stroke(),c.begin()),c.translate(0,m/2),c.moveTo(0,m),c.curveTo(0,2*m,n,2*m,n,m),A||(c.stroke(),c.begin()),c.translate(0,m/2),c.moveTo(0,m),c.curveTo(0,2*m,n,2*m,n,m),A||(c.stroke(),c.begin()),c.translate(0,
+-m);A||(c.moveTo(0,m),c.curveTo(0,-m/3,n,-m/3,n,m),c.lineTo(n,u-m),c.curveTo(n,u+m/3,0,u+m/3,0,u-m),c.close())};N.prototype.getLabelMargins=function(c){return new mxRectangle(0,2.5*Math.min(c.height/2,Math.round(c.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",N);mxUtils.extend(R,mxCylinder);R.prototype.size=30;R.prototype.darkOpacity=0;R.prototype.paintVertexShape=function(c,m,v,n,u){var A=Math.max(0,Math.min(n,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",
+this.size))))),C=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));c.translate(m,v);c.begin();c.moveTo(0,0);c.lineTo(n-A,0);c.lineTo(n,A);c.lineTo(n,u);c.lineTo(0,u);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=C&&(c.setFillAlpha(Math.abs(C)),c.setFillColor(0>C?"#FFFFFF":"#000000"),c.begin(),c.moveTo(n-A,0),c.lineTo(n-A,A),c.lineTo(n,A),c.close(),c.fill()),c.begin(),c.moveTo(n-A,0),c.lineTo(n-A,A),c.lineTo(n,A),
+c.end(),c.stroke())};mxCellRenderer.registerShape("note",R);mxUtils.extend(G,R);mxCellRenderer.registerShape("note2",G);G.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,m*this.scale),0,0)}return null};mxUtils.extend(M,mxShape);M.prototype.isoAngle=15;M.prototype.paintVertexShape=function(c,m,v,n,u){var A=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,
+"isoAngle",this.isoAngle))))*Math.PI/200;A=Math.min(n*Math.tan(A),.5*u);c.translate(m,v);c.begin();c.moveTo(.5*n,0);c.lineTo(n,A);c.lineTo(n,u-A);c.lineTo(.5*n,u);c.lineTo(0,u-A);c.lineTo(0,A);c.close();c.fillAndStroke();c.setShadow(!1);c.begin();c.moveTo(0,A);c.lineTo(.5*n,2*A);c.lineTo(n,A);c.moveTo(.5*n,2*A);c.lineTo(.5*n,u);c.stroke()};mxCellRenderer.registerShape("isoCube2",M);mxUtils.extend(Q,mxShape);Q.prototype.size=15;Q.prototype.paintVertexShape=function(c,m,v,n,u){var A=Math.max(0,Math.min(.5*
+u,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(m,v);0==A?(c.rect(0,0,n,u),c.fillAndStroke()):(c.begin(),c.moveTo(0,A),c.arcTo(.5*n,A,0,0,1,.5*n,0),c.arcTo(.5*n,A,0,0,1,n,A),c.lineTo(n,u-A),c.arcTo(.5*n,A,0,0,1,.5*n,u),c.arcTo(.5*n,A,0,0,1,0,u-A),c.close(),c.fillAndStroke(),c.setShadow(!1),c.begin(),c.moveTo(n,A),c.arcTo(.5*n,A,0,0,1,.5*n,2*A),c.arcTo(.5*n,A,0,0,1,0,A),c.stroke())};mxCellRenderer.registerShape("cylinder2",Q);mxUtils.extend(e,mxCylinder);e.prototype.size=
+15;e.prototype.paintVertexShape=function(c,m,v,n,u){var A=Math.max(0,Math.min(.5*u,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),C=mxUtils.getValue(this.style,"lid",!0);c.translate(m,v);0==A?(c.rect(0,0,n,u),c.fillAndStroke()):(c.begin(),C?(c.moveTo(0,A),c.arcTo(.5*n,A,0,0,1,.5*n,0),c.arcTo(.5*n,A,0,0,1,n,A)):(c.moveTo(0,0),c.arcTo(.5*n,A,0,0,0,.5*n,A),c.arcTo(.5*n,A,0,0,0,n,0)),c.lineTo(n,u-A),c.arcTo(.5*n,A,0,0,1,.5*n,u),c.arcTo(.5*n,A,0,0,1,0,u-A),c.close(),c.fillAndStroke(),c.setShadow(!1),
+C&&(c.begin(),c.moveTo(n,A),c.arcTo(.5*n,A,0,0,1,.5*n,2*A),c.arcTo(.5*n,A,0,0,1,0,A),c.stroke()))};mxCellRenderer.registerShape("cylinder3",e);mxUtils.extend(f,mxActor);f.prototype.redrawPath=function(c,m,v,n,u){c.moveTo(0,0);c.quadTo(n/2,.5*u,n,0);c.quadTo(.5*n,u/2,n,u);c.quadTo(n/2,.5*u,0,u);c.quadTo(.5*n,u/2,0,0);c.end()};mxCellRenderer.registerShape("switch",f);mxUtils.extend(k,mxCylinder);k.prototype.tabWidth=60;k.prototype.tabHeight=20;k.prototype.tabPosition="right";k.prototype.arcSize=.1;
+k.prototype.paintVertexShape=function(c,m,v,n,u){c.translate(m,v);m=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));v=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var A=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),C=mxUtils.getValue(this.style,"rounded",!1),ha=mxUtils.getValue(this.style,"absoluteArcSize",!1),K=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));ha||(K*=Math.min(n,u));
+K=Math.min(K,.5*n,.5*(u-v));m=Math.max(m,K);m=Math.min(n-K,m);C||(K=0);c.begin();"left"==A?(c.moveTo(Math.max(K,0),v),c.lineTo(Math.max(K,0),0),c.lineTo(m,0),c.lineTo(m,v)):(c.moveTo(n-m,v),c.lineTo(n-m,0),c.lineTo(n-Math.max(K,0),0),c.lineTo(n-Math.max(K,0),v));C?(c.moveTo(0,K+v),c.arcTo(K,K,0,0,1,K,v),c.lineTo(n-K,v),c.arcTo(K,K,0,0,1,n,K+v),c.lineTo(n,u-K),c.arcTo(K,K,0,0,1,n-K,u),c.lineTo(K,u),c.arcTo(K,K,0,0,1,0,u-K)):(c.moveTo(0,v),c.lineTo(n,v),c.lineTo(n,u),c.lineTo(0,u));c.close();c.fillAndStroke();
+c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c.begin(),c.moveTo(n-30,v+20),c.lineTo(n-20,v+10),c.lineTo(n-10,v+20),c.close(),c.stroke())};mxCellRenderer.registerShape("folder",k);k.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var v=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;m=mxUtils.getValue(this.style,
+"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),u=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));u||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-m));n||(A=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-v),Math.min(c.height,c.height-m)):new mxRectangle(Math.min(c.width,c.width-v),0,A,Math.min(c.height,c.height-
+m))}return new mxRectangle(0,Math.min(c.height,m),0,0)}return null};mxUtils.extend(z,mxCylinder);z.prototype.arcSize=.1;z.prototype.paintVertexShape=function(c,m,v,n,u){c.translate(m,v);var A=mxUtils.getValue(this.style,"rounded",!1),C=mxUtils.getValue(this.style,"absoluteArcSize",!1);m=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v=mxUtils.getValue(this.style,"umlStateConnection",null);C||(m*=Math.min(n,u));m=Math.min(m,.5*n,.5*u);A||(m=0);A=0;null!=v&&(A=10);c.begin();c.moveTo(A,
+m);c.arcTo(m,m,0,0,1,A+m,0);c.lineTo(n-m,0);c.arcTo(m,m,0,0,1,n,m);c.lineTo(n,u-m);c.arcTo(m,m,0,0,1,n-m,u);c.lineTo(A+m,u);c.arcTo(m,m,0,0,1,A,u-m);c.close();c.fillAndStroke();c.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(c.roundrect(n-40,u-20,10,10,3,3),c.stroke(),c.roundrect(n-20,u-20,10,10,3,3),c.stroke(),c.begin(),c.moveTo(n-30,u-15),c.lineTo(n-20,u-15),c.stroke());"connPointRefEntry"==v?(c.ellipse(0,.5*u-10,20,20),c.fillAndStroke()):"connPointRefExit"==
+v&&(c.ellipse(0,.5*u-10,20,20),c.fillAndStroke(),c.begin(),c.moveTo(5,.5*u-5),c.lineTo(15,.5*u+5),c.moveTo(15,.5*u-5),c.lineTo(5,.5*u+5),c.stroke())};z.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",z);mxUtils.extend(t,mxActor);t.prototype.size=30;t.prototype.isRoundable=function(){return!0};t.prototype.redrawPath=
+function(c,m,v,n,u){m=Math.max(0,Math.min(n,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(m,0),new mxPoint(n,0),new mxPoint(n,u),new mxPoint(0,u),new mxPoint(0,m)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("card",t);mxUtils.extend(B,mxActor);B.prototype.size=.4;B.prototype.redrawPath=function(c,m,v,n,u){m=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));c.moveTo(0,m/2);c.quadTo(n/4,1.4*m,n/2,m/2);c.quadTo(3*n/4,m*(1-1.4),n,m/2);c.lineTo(n,u-m/2);c.quadTo(3*n/4,u-1.4*m,n/2,u-m/2);c.quadTo(n/4,u-m*(1-1.4),0,u-m/2);c.lineTo(0,m/2);c.close();c.end()};B.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",this.size),v=c.width,n=c.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return m*=
+n,new mxRectangle(c.x,c.y+m,v,n-2*m);m*=v;return new mxRectangle(c.x+m,c.y,v-2*m,n)}return c};mxCellRenderer.registerShape("tape",B);mxUtils.extend(I,mxActor);I.prototype.size=.3;I.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};I.prototype.redrawPath=function(c,m,v,n,u){m=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,
+0);c.lineTo(n,0);c.lineTo(n,u-m/2);c.quadTo(3*n/4,u-1.4*m,n/2,u-m/2);c.quadTo(n/4,u-m*(1-1.4),0,u-m/2);c.lineTo(0,m/2);c.close();c.end()};mxCellRenderer.registerShape("document",I);var rb=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,m,v,n){var u=mxUtils.getValue(this.style,"size");return null!=u?n*Math.max(0,Math.min(1,u)):rb.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=2*mxUtils.getValue(this.style,
+"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,c.height*m),0,0)}return null};e.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(m/=2);return new mxRectangle(0,Math.min(c.height*this.scale,2*m*this.scale),0,Math.max(0,.3*m*this.scale))}return null};k.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,
+"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var v=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;m=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),u=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));u||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-m));n||(A=0);return"left"==mxUtils.getValue(this.style,"tabPosition",
+this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-v),Math.min(c.height,c.height-m)):new mxRectangle(Math.min(c.width,c.width-v),0,A,Math.min(c.height,c.height-m))}return new mxRectangle(0,Math.min(c.height,m),0,0)}return null};z.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};G.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,
+"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,m*this.scale),0,Math.max(0,m*this.scale))}return null};mxUtils.extend(O,mxActor);O.prototype.size=.2;O.prototype.fixedSize=20;O.prototype.isRoundable=function(){return!0};O.prototype.redrawPath=function(c,m,v,n,u){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,u),new mxPoint(m,0),new mxPoint(n,0),new mxPoint(n-m,u)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("parallelogram",O);mxUtils.extend(J,mxActor);J.prototype.size=.2;J.prototype.fixedSize=20;J.prototype.isRoundable=function(){return!0};J.prototype.redrawPath=function(c,m,v,n,u){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*
+n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,u),new mxPoint(m,0),new mxPoint(n-m,0),new mxPoint(n,u)],this.isRounded,v,!0)};mxCellRenderer.registerShape("trapezoid",J);mxUtils.extend(y,mxActor);y.prototype.size=.5;y.prototype.redrawPath=function(c,m,v,n,u){c.setFillColor(null);
+m=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(n,0),new mxPoint(m,0),new mxPoint(m,u/2),new mxPoint(0,u/2),new mxPoint(m,u/2),new mxPoint(m,u),new mxPoint(n,u)],this.isRounded,v,!1);c.end()};mxCellRenderer.registerShape("curlyBracket",y);mxUtils.extend(ia,mxActor);ia.prototype.redrawPath=function(c,m,v,n,u){c.setStrokeWidth(1);c.setFillColor(this.stroke);
+m=n/5;c.rect(0,0,m,u);c.fillAndStroke();c.rect(2*m,0,m,u);c.fillAndStroke();c.rect(4*m,0,m,u);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",ia);da.prototype.moveTo=function(c,m){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=m;this.firstX=c;this.firstY=m};da.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)};
+da.prototype.quadTo=function(c,m,v,n){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=n};da.prototype.curveTo=function(c,m,v,n,u,A){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=u;this.lastY=A};da.prototype.arcTo=function(c,m,v,n,u,A,C){this.originalArcTo.apply(this.canvas,arguments);this.lastX=A;this.lastY=C};da.prototype.lineTo=function(c,m){if(null!=this.lastX&&null!=this.lastY){var v=function(ma){return"number"===typeof ma?ma?0>ma?-1:1:ma===ma?0:NaN:NaN},
+n=Math.abs(c-this.lastX),u=Math.abs(m-this.lastY),A=Math.sqrt(n*n+u*u);if(2>A){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=m;return}var C=Math.round(A/10),ha=this.defaultVariation;5>C&&(C=5,ha/=3);var K=v(c-this.lastX)*n/C;v=v(m-this.lastY)*u/C;n/=A;u/=A;for(A=0;A<C;A++){var wa=(Math.random()-.5)*ha;this.originalLineTo.call(this.canvas,K*A+this.lastX-wa*u,v*A+this.lastY-wa*n)}this.originalLineTo.call(this.canvas,c,m)}else this.originalLineTo.apply(this.canvas,arguments);
+this.lastX=c;this.lastY=m};da.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};mxShape.prototype.defaultJiggle=1.5;var mb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(c){mb.apply(this,arguments);null==c.handJiggle&&(c.handJiggle=this.createHandJiggle(c))};var vb=mxShape.prototype.afterPaint;
+mxShape.prototype.afterPaint=function(c){vb.apply(this,arguments);null!=c.handJiggle&&(c.handJiggle.destroy(),delete c.handJiggle)};mxShape.prototype.createComicCanvas=function(c){return new da(c,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(c){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(c)};mxRhombus.prototype.defaultJiggle=2;var Bb=mxRectangleShape.prototype.isHtmlAllowed;
+mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&Bb.apply(this,arguments)};var Ya=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(c,m,v,n,u){if(null==c.handJiggle||c.handJiggle.constructor!=da)Ya.apply(this,arguments);else{var A=!0;null!=this.style&&(A="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,
"1"));if(A||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)A||null!=this.fill&&this.fill!=mxConstants.NONE||(c.pointerEvents=!1),c.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?A=Math.min(n/2,Math.min(u/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,A=Math.min(n*
-A,u*A)),c.moveTo(l+A,v),c.lineTo(l+n-A,v),c.quadTo(l+n,v,l+n,v+A),c.lineTo(l+n,v+u-A),c.quadTo(l+n,v+u,l+n-A,v+u),c.lineTo(l+A,v+u),c.quadTo(l,v+u,l,v+u-A),c.lineTo(l,v+A),c.quadTo(l,v,l+A,v)):(c.moveTo(l,v),c.lineTo(l+n,v),c.lineTo(l+n,v+u),c.lineTo(l,v+u),c.lineTo(l,v)),c.close(),c.end(),c.fillAndStroke()}};mxUtils.extend(ra,mxRectangleShape);ra.prototype.size=.1;ra.prototype.fixedSize=!1;ra.prototype.isHtmlAllowed=function(){return!1};ra.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.state.style,
-mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var l=c.width,v=c.height;c=new mxRectangle(c.x,c.y,l,v);var n=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var u=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;n=Math.max(n,Math.min(l*u,v*u))}c.x+=Math.round(n);c.width-=Math.round(2*n);return c}return c};
-ra.prototype.paintForeground=function(c,l,v,n,u){var A=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),B=parseFloat(mxUtils.getValue(this.style,"size",this.size));B=A?Math.max(0,Math.min(n,B)):n*Math.max(0,Math.min(1,B));this.isRounded&&(A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,B=Math.max(B,Math.min(n*A,u*A)));B=Math.round(B);c.begin();c.moveTo(l+B,v);c.lineTo(l+B,v+u);c.moveTo(l+n-B,v);c.lineTo(l+n-B,v+u);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.registerShape("process",ra);mxCellRenderer.registerShape("process2",ra);mxUtils.extend(ba,mxRectangleShape);ba.prototype.paintBackground=function(c,l,v,n,u){c.setFillColor(mxConstants.NONE);c.rect(l,v,n,u);c.fill()};ba.prototype.paintForeground=function(c,l,v,n,u){};mxCellRenderer.registerShape("transparent",ba);mxUtils.extend(oa,mxHexagon);oa.prototype.size=30;oa.prototype.position=.5;oa.prototype.position2=.5;oa.prototype.base=20;oa.prototype.getLabelMargins=function(){return new mxRectangle(0,
-0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};oa.prototype.isRoundable=function(){return!0};oa.prototype.redrawPath=function(c,l,v,n,u){l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;v=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var A=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),B=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",
-this.position2)))),ca=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,u-v),new mxPoint(Math.min(n,A+ca),u-v),new mxPoint(B,u),new mxPoint(Math.max(0,A),u-v),new mxPoint(0,u-v)],this.isRounded,l,!0,[4])};mxCellRenderer.registerShape("callout",oa);mxUtils.extend(na,mxActor);na.prototype.size=.2;na.prototype.fixedSize=20;na.prototype.isRoundable=function(){return!0};na.prototype.redrawPath=function(c,
-l,v,n,u){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n-l,0),new mxPoint(n,u/2),new mxPoint(n-l,u),new mxPoint(0,u),new mxPoint(l,u/2)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("step",
-na);mxUtils.extend(N,mxHexagon);N.prototype.size=.25;N.prototype.fixedSize=20;N.prototype.isRoundable=function(){return!0};N.prototype.redrawPath=function(c,l,v,n,u){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,
-0),new mxPoint(n-l,0),new mxPoint(n,.5*u),new mxPoint(n-l,u),new mxPoint(l,u),new mxPoint(0,.5*u)],this.isRounded,v,!0)};mxCellRenderer.registerShape("hexagon",N);mxUtils.extend(aa,mxRectangleShape);aa.prototype.isHtmlAllowed=function(){return!1};aa.prototype.paintForeground=function(c,l,v,n,u){var A=Math.min(n/5,u/5)+1;c.begin();c.moveTo(l+n/2,v+A);c.lineTo(l+n/2,v+u-A);c.moveTo(l+A,v+u/2);c.lineTo(l+n-A,v+u/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
-mxCellRenderer.registerShape("plus",aa);var ab=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};mxRhombus.prototype.paintVertexShape=function(c,l,v,n,u){ab.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var A=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
-0);l+=A;v+=A;n-=2*A;u-=2*A;0<n&&0<u&&(c.setShadow(!1),ab.apply(this,[c,l,v,n,u]))}};mxUtils.extend(V,mxRectangleShape);V.prototype.isHtmlAllowed=function(){return!1};V.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};V.prototype.paintForeground=function(c,l,v,n,u){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var A=
-Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);l+=A;v+=A;n-=2*A;u-=2*A;0<n&&0<u&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);A=0;do{var B=mxCellRenderer.defaultShapes[this.style["symbol"+A]];if(null!=B){var ca=this.style["symbol"+A+"Align"],K=this.style["symbol"+A+"VerticalAlign"],wa=this.style["symbol"+A+"Width"],ma=this.style["symbol"+A+"Height"],Xa=this.style["symbol"+A+"Spacing"]||0,jb=this.style["symbol"+A+"VSpacing"]||
-Xa,bb=this.style["symbol"+A+"ArcSpacing"];null!=bb&&(bb*=this.getArcSize(n+this.strokewidth,u+this.strokewidth),Xa+=bb,jb+=bb);bb=l;var Ga=v;bb=ca==mxConstants.ALIGN_CENTER?bb+(n-wa)/2:ca==mxConstants.ALIGN_RIGHT?bb+(n-wa-Xa):bb+Xa;Ga=K==mxConstants.ALIGN_MIDDLE?Ga+(u-ma)/2:K==mxConstants.ALIGN_BOTTOM?Ga+(u-ma-jb):Ga+jb;c.save();ca=new B;ca.style=this.style;B.prototype.paintVertexShape.call(ca,c,bb,Ga,wa,ma);c.restore()}A++}while(null!=B)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
-mxCellRenderer.registerShape("ext",V);mxUtils.extend(ha,mxCylinder);ha.prototype.redrawPath=function(c,l,v,n,u,A){A?(c.moveTo(0,0),c.lineTo(n/2,u/2),c.lineTo(n,0),c.end()):(c.moveTo(0,0),c.lineTo(n,0),c.lineTo(n,u),c.lineTo(0,u),c.close())};mxCellRenderer.registerShape("message",ha);mxUtils.extend(X,mxShape);X.prototype.paintBackground=function(c,l,v,n,u){c.translate(l,v);c.ellipse(n/4,0,n/2,u/4);c.fillAndStroke();c.begin();c.moveTo(n/2,u/4);c.lineTo(n/2,2*u/3);c.moveTo(n/2,u/3);c.lineTo(0,u/3);c.moveTo(n/
-2,u/3);c.lineTo(n,u/3);c.moveTo(n/2,2*u/3);c.lineTo(0,u);c.moveTo(n/2,2*u/3);c.lineTo(n,u);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",X);mxUtils.extend(ia,mxShape);ia.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};ia.prototype.paintBackground=function(c,l,v,n,u){c.translate(l,v);c.begin();c.moveTo(0,u/4);c.lineTo(0,3*u/4);c.end();c.stroke();c.begin();c.moveTo(0,u/2);c.lineTo(n/6,u/2);c.end();c.stroke();c.ellipse(n/6,0,5*n/6,u);c.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",
-ia);mxUtils.extend(q,mxEllipse);q.prototype.paintVertexShape=function(c,l,v,n,u){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+n/8,v+u);c.lineTo(l+7*n/8,v+u);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",q);mxUtils.extend(E,mxShape);E.prototype.paintVertexShape=function(c,l,v,n,u){c.translate(l,v);c.begin();c.moveTo(n,0);c.lineTo(0,u);c.moveTo(0,0);c.lineTo(n,u);c.end();c.stroke()};mxCellRenderer.registerShape("umlDestroy",E);mxUtils.extend(Q,mxShape);
-Q.prototype.getLabelBounds=function(c){return new mxRectangle(c.x,c.y+c.height/8,c.width,7*c.height/8)};Q.prototype.paintBackground=function(c,l,v,n,u){c.translate(l,v);c.begin();c.moveTo(3*n/8,u/8*1.1);c.lineTo(5*n/8,0);c.end();c.stroke();c.ellipse(0,u/8,n,7*u/8);c.fillAndStroke()};Q.prototype.paintForeground=function(c,l,v,n,u){c.begin();c.moveTo(3*n/8,u/8*1.1);c.lineTo(5*n/8,u/4);c.end();c.stroke()};mxCellRenderer.registerShape("umlControl",Q);mxUtils.extend(Y,mxRectangleShape);Y.prototype.size=
-40;Y.prototype.isHtmlAllowed=function(){return!1};Y.prototype.getLabelBounds=function(c){var l=Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(c.x,c.y,c.width,l)};Y.prototype.paintBackground=function(c,l,v,n,u){var A=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),B=mxUtils.getValue(this.style,"participant");null==B||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,c,l,
-v,n,A):(B=this.state.view.graph.cellRenderer.getShape(B),null!=B&&B!=Y&&(B=new B,B.apply(this.state),c.save(),B.paintVertexShape(c,l,v,n,A),c.restore()));A<u&&(c.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),c.begin(),c.moveTo(l+n/2,v+A),c.lineTo(l+n/2,v+u),c.end(),c.stroke())};Y.prototype.paintForeground=function(c,l,v,n,u){var A=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,c,l,v,n,Math.min(u,
-A))};mxCellRenderer.registerShape("umlLifeline",Y);mxUtils.extend(R,mxShape);R.prototype.width=60;R.prototype.height=30;R.prototype.corner=10;R.prototype.getLabelMargins=function(c){return new mxRectangle(0,0,c.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),c.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};R.prototype.paintBackground=function(c,l,v,n,u){var A=this.corner,B=Math.min(n,Math.max(A,parseFloat(mxUtils.getValue(this.style,
-"width",this.width)))),ca=Math.min(u,Math.max(1.5*A,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),K=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);K!=mxConstants.NONE&&(c.setFillColor(K),c.rect(l,v,n,u),c.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(c,l,v,n,u),c.setGradient(this.fill,this.gradient,l,v,n,u,this.gradientDirection)):c.setFillColor(this.fill);c.begin();
-c.moveTo(l,v);c.lineTo(l+B,v);c.lineTo(l+B,v+Math.max(0,ca-1.5*A));c.lineTo(l+Math.max(0,B-A),v+ca);c.lineTo(l,v+ca);c.close();c.fillAndStroke();c.begin();c.moveTo(l+B,v);c.lineTo(l+n,v);c.lineTo(l+n,v+u);c.lineTo(l,v+u);c.lineTo(l,v+ca);c.stroke()};mxCellRenderer.registerShape("umlFrame",R);mxPerimeter.CenterPerimeter=function(c,l,v,n){return new mxPoint(c.getCenterX(),c.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(c,
-l,v,n){n=Y.prototype.size;null!=l&&(n=mxUtils.getValue(l.style,"size",n)*l.view.scale);l=parseFloat(l.style[mxConstants.STYLE_STROKEWIDTH]||1)*l.view.scale/2-1;v.x<c.getCenterX()&&(l=-1*(l+1));return new mxPoint(c.getCenterX()+l,Math.min(c.y+c.height,Math.max(c.y+n,v.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(c,l,v,n){n=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",
-mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(c,l,v,n){n=parseFloat(l.style[mxConstants.STYLE_STROKEWIDTH]||1)*l.view.scale/2-1;null!=l.style.backboneSize&&(n+=parseFloat(l.style.backboneSize)*l.view.scale/2-1);if("south"==l.style[mxConstants.STYLE_DIRECTION]||"north"==l.style[mxConstants.STYLE_DIRECTION])return v.x<c.getCenterX()&&(n=-1*(n+1)),new mxPoint(c.getCenterX()+n,Math.min(c.y+c.height,Math.max(c.y,v.y)));v.y<c.getCenterY()&&(n=-1*(n+1));return new mxPoint(Math.min(c.x+
-c.width,Math.max(c.x,v.x)),c.getCenterY()+n)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(c,l,v,n){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(c,new mxRectangle(0,0,0,Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(l.style,"size",oa.prototype.size))*l.view.scale))),l.style),l,v,n)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c,
-l,v,n){var u="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=u?S.prototype.fixedSize:S.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));u&&(A*=l.view.scale);var B=c.x,ca=c.y,K=c.width,wa=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B,ca),new mxPoint(B+K,ca+u),new mxPoint(B+
-K,ca+wa),new mxPoint(B,ca+wa-u),new mxPoint(B,ca)]):(u=u?Math.max(0,Math.min(.5*K,A)):K*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B+u,ca),new mxPoint(B+K,ca),new mxPoint(B+K-u,ca+wa),new mxPoint(B,ca+wa),new mxPoint(B+u,ca)]);wa=c.getCenterX();c=c.getCenterY();c=new mxPoint(wa,c);n&&(v.x<B||v.x>B+K?c.y=v.y:c.x=v.x);return mxUtils.getPerimeterPoint(ca,c,v)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,l,v,n){var u="0"!=
-mxUtils.getValue(l.style,"fixedSize","0"),A=u?T.prototype.fixedSize:T.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));u&&(A*=l.view.scale);var B=c.x,ca=c.y,K=c.width,wa=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(u=u?Math.max(0,Math.min(.5*K,A)):K*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B+u,ca),new mxPoint(B+K-u,ca),new mxPoint(B+K,ca+wa),new mxPoint(B,ca+wa),new mxPoint(B+
-u,ca)]):l==mxConstants.DIRECTION_WEST?(u=u?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B,ca),new mxPoint(B+K,ca),new mxPoint(B+K-u,ca+wa),new mxPoint(B+u,ca+wa),new mxPoint(B,ca)]):l==mxConstants.DIRECTION_NORTH?(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B,ca+u),new mxPoint(B+K,ca),new mxPoint(B+K,ca+wa),new mxPoint(B,ca+wa-u),new mxPoint(B,ca+u)]):(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B,ca),new mxPoint(B+
-K,ca+u),new mxPoint(B+K,ca+wa-u),new mxPoint(B,ca+wa),new mxPoint(B,ca)]);wa=c.getCenterX();c=c.getCenterY();c=new mxPoint(wa,c);n&&(v.x<B||v.x>B+K?c.y=v.y:c.x=v.x);return mxUtils.getPerimeterPoint(ca,c,v)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,l,v,n){var u="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=u?na.prototype.fixedSize:na.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));u&&(A*=l.view.scale);var B=
-c.x,ca=c.y,K=c.width,wa=c.height,ma=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(u=u?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B,ca),new mxPoint(B+K-u,ca),new mxPoint(B+K,c),new mxPoint(B+K-u,ca+wa),new mxPoint(B,ca+wa),new mxPoint(B+u,c),new mxPoint(B,ca)]):l==mxConstants.DIRECTION_WEST?(u=u?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,
-A)),ca=[new mxPoint(B+u,ca),new mxPoint(B+K,ca),new mxPoint(B+K-u,c),new mxPoint(B+K,ca+wa),new mxPoint(B+u,ca+wa),new mxPoint(B,c),new mxPoint(B+u,ca)]):l==mxConstants.DIRECTION_NORTH?(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B,ca+u),new mxPoint(ma,ca),new mxPoint(B+K,ca+u),new mxPoint(B+K,ca+wa),new mxPoint(ma,ca+wa-u),new mxPoint(B,ca+wa),new mxPoint(B,ca+u)]):(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B,ca),new mxPoint(ma,ca+
-u),new mxPoint(B+K,ca),new mxPoint(B+K,ca+wa-u),new mxPoint(ma,ca+wa),new mxPoint(B,ca+wa-u),new mxPoint(B,ca)]);ma=new mxPoint(ma,c);n&&(v.x<B||v.x>B+K?ma.y=v.y:ma.x=v.x);return mxUtils.getPerimeterPoint(ca,ma,v)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,l,v,n){var u="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=u?N.prototype.fixedSize:N.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));u&&(A*=l.view.scale);var B=
-c.x,ca=c.y,K=c.width,wa=c.height,ma=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ca=[new mxPoint(ma,ca),new mxPoint(B+K,ca+u),new mxPoint(B+K,ca+wa-u),new mxPoint(ma,ca+wa),new mxPoint(B,ca+wa-u),new mxPoint(B,ca+u),new mxPoint(ma,ca)]):(u=u?Math.max(0,Math.min(K,A)):K*Math.max(0,
-Math.min(1,A)),ca=[new mxPoint(B+u,ca),new mxPoint(B+K-u,ca),new mxPoint(B+K,c),new mxPoint(B+K-u,ca+wa),new mxPoint(B+u,ca+wa),new mxPoint(B,c),new mxPoint(B+u,ca)]);ma=new mxPoint(ma,c);n&&(v.x<B||v.x>B+K?ma.y=v.y:ma.x=v.x);return mxUtils.getPerimeterPoint(ca,ma,v)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(Z,mxShape);Z.prototype.size=10;Z.prototype.paintBackground=function(c,l,v,n,u){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size));
-c.translate(l,v);c.ellipse((n-A)/2,0,A,A);c.fillAndStroke();c.begin();c.moveTo(n/2,A);c.lineTo(n/2,u);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",Z);mxUtils.extend(da,mxShape);da.prototype.size=10;da.prototype.inset=2;da.prototype.paintBackground=function(c,l,v,n,u){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size)),B=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(l,v);c.begin();c.moveTo(n/2,A+B);c.lineTo(n/2,u);c.end();c.stroke();
-c.begin();c.moveTo((n-A)/2-B,A/2);c.quadTo((n-A)/2-B,A+B,n/2,A+B);c.quadTo((n+A)/2+B,A+B,(n+A)/2+B,A/2);c.end();c.stroke()};mxCellRenderer.registerShape("requires",da);mxUtils.extend(qa,mxShape);qa.prototype.paintBackground=function(c,l,v,n,u){c.translate(l,v);c.begin();c.moveTo(0,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,0,u);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",qa);mxUtils.extend(va,mxShape);va.prototype.inset=2;va.prototype.paintBackground=function(c,l,v,n,u){var A=parseFloat(mxUtils.getValue(this.style,
-"inset",this.inset))+this.strokewidth;c.translate(l,v);c.ellipse(0,A,n-2*A,u-2*A);c.fillAndStroke();c.begin();c.moveTo(n/2,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,n/2,u);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",va);mxUtils.extend(ja,mxCylinder);ja.prototype.jettyWidth=20;ja.prototype.jettyHeight=10;ja.prototype.redrawPath=function(c,l,v,n,u,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",
-this.jettyHeight));v=B/2;B=v+B/2;var ca=Math.min(l,u-l),K=Math.min(ca+2*l,u-l);A?(c.moveTo(v,ca),c.lineTo(B,ca),c.lineTo(B,ca+l),c.lineTo(v,ca+l),c.moveTo(v,K),c.lineTo(B,K),c.lineTo(B,K+l),c.lineTo(v,K+l)):(c.moveTo(v,0),c.lineTo(n,0),c.lineTo(n,u),c.lineTo(v,u),c.lineTo(v,K+l),c.lineTo(0,K+l),c.lineTo(0,K),c.lineTo(v,K),c.lineTo(v,ca+l),c.lineTo(0,ca+l),c.lineTo(0,ca),c.lineTo(v,ca),c.close());c.end()};mxCellRenderer.registerShape("module",ja);mxUtils.extend(sa,mxCylinder);sa.prototype.jettyWidth=
-32;sa.prototype.jettyHeight=12;sa.prototype.redrawPath=function(c,l,v,n,u,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));v=B/2;B=v+B/2;var ca=.3*u-l/2,K=.7*u-l/2;A?(c.moveTo(v,ca),c.lineTo(B,ca),c.lineTo(B,ca+l),c.lineTo(v,ca+l),c.moveTo(v,K),c.lineTo(B,K),c.lineTo(B,K+l),c.lineTo(v,K+l)):(c.moveTo(v,0),c.lineTo(n,0),c.lineTo(n,u),c.lineTo(v,u),c.lineTo(v,K+l),c.lineTo(0,K+l),c.lineTo(0,K),c.lineTo(v,
-K),c.lineTo(v,ca+l),c.lineTo(0,ca+l),c.lineTo(0,ca),c.lineTo(v,ca),c.close());c.end()};mxCellRenderer.registerShape("component",sa);mxUtils.extend(ya,mxRectangleShape);ya.prototype.paintForeground=function(c,l,v,n,u){var A=n/2,B=u/2,ca=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c.begin();this.addPoints(c,[new mxPoint(l+A,v),new mxPoint(l+n,v+B),new mxPoint(l+A,v+u),new mxPoint(l,v+B)],this.isRounded,ca,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.registerShape("associativeEntity",ya);mxUtils.extend(Aa,mxDoubleEllipse);Aa.prototype.outerStroke=!0;Aa.prototype.paintVertexShape=function(c,l,v,n,u){var A=Math.min(4,Math.min(n/5,u/5));0<n&&0<u&&(c.ellipse(l+A,v+A,n-2*A,u-2*A),c.fillAndStroke());c.setShadow(!1);this.outerStroke&&(c.ellipse(l,v,n,u),c.stroke())};mxCellRenderer.registerShape("endState",Aa);mxUtils.extend(Ea,Aa);Ea.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",Ea);mxUtils.extend(za,mxArrowConnector);
-za.prototype.defaultWidth=4;za.prototype.isOpenEnded=function(){return!0};za.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};za.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",za);mxUtils.extend(Ia,mxArrowConnector);Ia.prototype.defaultWidth=10;Ia.prototype.defaultArrowWidth=20;Ia.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,
-"startWidth",this.defaultArrowWidth)};Ia.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Ia.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Ia);mxUtils.extend(Ca,mxActor);Ca.prototype.size=30;Ca.prototype.isRoundable=function(){return!0};Ca.prototype.redrawPath=function(c,l,v,n,u){l=Math.min(u,parseFloat(mxUtils.getValue(this.style,
-"size",this.size)));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,u),new mxPoint(0,l),new mxPoint(n,0),new mxPoint(n,u)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("manualInput",Ca);mxUtils.extend(Sa,mxRectangleShape);Sa.prototype.dx=20;Sa.prototype.dy=20;Sa.prototype.isHtmlAllowed=function(){return!1};Sa.prototype.paintForeground=function(c,l,v,n,u){mxRectangleShape.prototype.paintForeground.apply(this,arguments);
-var A=0;if(this.isRounded){var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;A=Math.max(A,Math.min(n*B,u*B))}B=Math.max(A,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));A=Math.max(A,Math.min(u,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.begin();c.moveTo(l,v+A);c.lineTo(l+n,v+A);c.end();c.stroke();c.begin();c.moveTo(l+B,v);c.lineTo(l+B,v+u);c.end();c.stroke()};mxCellRenderer.registerShape("internalStorage",Sa);
-mxUtils.extend(Pa,mxActor);Pa.prototype.dx=20;Pa.prototype.dy=20;Pa.prototype.redrawPath=function(c,l,v,n,u){l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));v=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,v),new mxPoint(l,v),
-new mxPoint(l,u),new mxPoint(0,u)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("corner",Pa);mxUtils.extend(Ta,mxActor);Ta.prototype.redrawPath=function(c,l,v,n,u){c.moveTo(0,0);c.lineTo(0,u);c.end();c.moveTo(n,0);c.lineTo(n,u);c.end();c.moveTo(0,u/2);c.lineTo(n,u/2);c.end()};mxCellRenderer.registerShape("crossbar",Ta);mxUtils.extend(Za,mxActor);Za.prototype.dx=20;Za.prototype.dy=20;Za.prototype.redrawPath=function(c,l,v,n,u){l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,
-"dx",this.dx))));v=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,v),new mxPoint((n+l)/2,v),new mxPoint((n+l)/2,u),new mxPoint((n-l)/2,u),new mxPoint((n-l)/2,v),new mxPoint(0,v)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("tee",Za);mxUtils.extend(Na,
-mxActor);Na.prototype.arrowWidth=.3;Na.prototype.arrowSize=.2;Na.prototype.redrawPath=function(c,l,v,n,u){var A=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));l=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));v=(u-A)/2;A=v+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(n-l,v),new mxPoint(n-l,0),new mxPoint(n,u/2),new mxPoint(n-
-l,u),new mxPoint(n-l,A),new mxPoint(0,A)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("singleArrow",Na);mxUtils.extend(z,mxActor);z.prototype.redrawPath=function(c,l,v,n,u){var A=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Na.prototype.arrowWidth))));l=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Na.prototype.arrowSize))));v=(u-A)/2;A=v+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2;this.addPoints(c,[new mxPoint(0,u/2),new mxPoint(l,0),new mxPoint(l,v),new mxPoint(n-l,v),new mxPoint(n-l,0),new mxPoint(n,u/2),new mxPoint(n-l,u),new mxPoint(n-l,A),new mxPoint(l,A),new mxPoint(l,u)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("doubleArrow",z);mxUtils.extend(J,mxActor);J.prototype.size=.1;J.prototype.fixedSize=20;J.prototype.redrawPath=function(c,l,v,n,u){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,
-"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(l,0);c.lineTo(n,0);c.quadTo(n-2*l,u/2,n,u);c.lineTo(l,u);c.quadTo(l-2*l,u/2,l,0);c.close();c.end()};mxCellRenderer.registerShape("dataStorage",J);mxUtils.extend(O,mxActor);O.prototype.redrawPath=function(c,l,v,n,u){c.moveTo(0,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,0,u);c.close();c.end()};mxCellRenderer.registerShape("or",O);mxUtils.extend(U,mxActor);U.prototype.redrawPath=function(c,
-l,v,n,u){c.moveTo(0,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,0,u);c.quadTo(n/2,u/2,0,0);c.close();c.end()};mxCellRenderer.registerShape("xor",U);mxUtils.extend(W,mxActor);W.prototype.size=20;W.prototype.isRoundable=function(){return!0};W.prototype.redrawPath=function(c,l,v,n,u){l=Math.min(n/2,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(n-l,0),new mxPoint(n,
-.8*l),new mxPoint(n,u),new mxPoint(0,u),new mxPoint(0,.8*l)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("loopLimit",W);mxUtils.extend(ea,mxActor);ea.prototype.size=.375;ea.prototype.isRoundable=function(){return!0};ea.prototype.redrawPath=function(c,l,v,n,u){l=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,
-u-l),new mxPoint(n/2,u),new mxPoint(0,u-l)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",ea);mxUtils.extend(ka,mxEllipse);ka.prototype.paintVertexShape=function(c,l,v,n,u){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+n/2,v+u);c.lineTo(l+n,v+u);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",ka);mxUtils.extend(xa,mxEllipse);xa.prototype.paintVertexShape=function(c,l,v,n,u){mxEllipse.prototype.paintVertexShape.apply(this,
-arguments);c.setShadow(!1);c.begin();c.moveTo(l,v+u/2);c.lineTo(l+n,v+u/2);c.end();c.stroke();c.begin();c.moveTo(l+n/2,v);c.lineTo(l+n/2,v+u);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse",xa);mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(c,l,v,n,u){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l+.145*n,v+.145*u);c.lineTo(l+.855*n,v+.855*u);c.end();c.stroke();c.begin();c.moveTo(l+.855*n,v+.145*u);c.lineTo(l+.145*n,
-v+.855*u);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",ta);mxUtils.extend(pa,mxRhombus);pa.prototype.paintVertexShape=function(c,l,v,n,u){mxRhombus.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l,v+u/2);c.lineTo(l+n,v+u/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",pa);mxUtils.extend(ua,mxEllipse);ua.prototype.paintVertexShape=function(c,l,v,n,u){c.begin();c.moveTo(l,v);c.lineTo(l+n,v);c.lineTo(l+n/2,v+u/2);c.close();c.fillAndStroke();
-c.begin();c.moveTo(l,v+u);c.lineTo(l+n,v+u);c.lineTo(l+n/2,v+u/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",ua);mxUtils.extend(Da,mxEllipse);Da.prototype.paintVertexShape=function(c,l,v,n,u){var A=c.state.strokeWidth/2,B=10+2*A,ca=v+u-B/2;c.begin();c.moveTo(l,v);c.lineTo(l,v+u);c.moveTo(l+A,ca);c.lineTo(l+A+B,ca-B/2);c.moveTo(l+A,ca);c.lineTo(l+A+B,ca+B/2);c.moveTo(l+A,ca);c.lineTo(l+n-A,ca);c.moveTo(l+n,v);c.lineTo(l+n,v+u);c.moveTo(l+n-A,ca);c.lineTo(l+n-B-A,ca-B/2);c.moveTo(l+
-n-A,ca);c.lineTo(l+n-B-A,ca+B/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",Da);mxUtils.extend(Fa,mxEllipse);Fa.prototype.drawHidden=!0;Fa.prototype.paintVertexShape=function(c,l,v,n,u){this.outline||c.setStrokeColor(null);if(null!=this.style){var A=c.pointerEvents,B=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||B||(c.pointerEvents=!1);var ca="1"==mxUtils.getValue(this.style,"top","1"),K="1"==mxUtils.getValue(this.style,
-"left","1"),wa="1"==mxUtils.getValue(this.style,"right","1"),ma="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||B||this.outline||ca||wa||ma||K?(c.rect(l,v,n,u),c.fill(),c.pointerEvents=A,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(l,v),this.outline||ca?c.lineTo(l+n,v):c.moveTo(l+n,v),this.outline||wa?c.lineTo(l+n,v+u):c.moveTo(l+n,v+u),this.outline||ma?c.lineTo(l,v+u):c.moveTo(l,v+u),(this.outline||K)&&c.lineTo(l,v),c.end(),c.stroke(),c.setLineCap("flat")):
-c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Fa);mxUtils.extend(Ma,mxEllipse);Ma.prototype.paintVertexShape=function(c,l,v,n,u){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,"line")?(c.moveTo(l+n/2,v),c.lineTo(l+n/2,v+u)):(c.moveTo(l,v+u/2),c.lineTo(l+n,v+u/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",Ma);mxUtils.extend(Qa,mxActor);Qa.prototype.redrawPath=function(c,
-l,v,n,u){l=Math.min(n,u/2);c.moveTo(0,0);c.lineTo(n-l,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,n-l,u);c.lineTo(0,u);c.close();c.end()};mxCellRenderer.registerShape("delay",Qa);mxUtils.extend(Ba,mxActor);Ba.prototype.size=.2;Ba.prototype.redrawPath=function(c,l,v,n,u){l=Math.min(u,n);var A=Math.max(0,Math.min(l,l*parseFloat(mxUtils.getValue(this.style,"size",this.size))));l=(u-A)/2;v=l+A;var B=(n-A)/2;A=B+A;c.moveTo(0,l);c.lineTo(B,l);c.lineTo(B,0);c.lineTo(A,0);c.lineTo(A,l);c.lineTo(n,l);c.lineTo(n,v);
-c.lineTo(A,v);c.lineTo(A,u);c.lineTo(B,u);c.lineTo(B,v);c.lineTo(0,v);c.close();c.end()};mxCellRenderer.registerShape("cross",Ba);mxUtils.extend(Ka,mxActor);Ka.prototype.size=.25;Ka.prototype.redrawPath=function(c,l,v,n,u){l=Math.min(n,u/2);v=Math.min(n-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*n);c.moveTo(0,u/2);c.lineTo(v,0);c.lineTo(n-l,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,n-l,u);c.lineTo(v,u);c.close();c.end()};mxCellRenderer.registerShape("display",Ka);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",
+A,u*A)),c.moveTo(m+A,v),c.lineTo(m+n-A,v),c.quadTo(m+n,v,m+n,v+A),c.lineTo(m+n,v+u-A),c.quadTo(m+n,v+u,m+n-A,v+u),c.lineTo(m+A,v+u),c.quadTo(m,v+u,m,v+u-A),c.lineTo(m,v+A),c.quadTo(m,v,m+A,v)):(c.moveTo(m,v),c.lineTo(m+n,v),c.lineTo(m+n,v+u),c.lineTo(m,v+u),c.lineTo(m,v)),c.close(),c.end(),c.fillAndStroke()}};mxUtils.extend(ja,mxRectangleShape);ja.prototype.size=.1;ja.prototype.fixedSize=!1;ja.prototype.isHtmlAllowed=function(){return!1};ja.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.state.style,
+mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var m=c.width,v=c.height;c=new mxRectangle(c.x,c.y,m,v);var n=m*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var u=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;n=Math.max(n,Math.min(m*u,v*u))}c.x+=Math.round(n);c.width-=Math.round(2*n);return c}return c};
+ja.prototype.paintForeground=function(c,m,v,n,u){var A=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),C=parseFloat(mxUtils.getValue(this.style,"size",this.size));C=A?Math.max(0,Math.min(n,C)):n*Math.max(0,Math.min(1,C));this.isRounded&&(A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,C=Math.max(C,Math.min(n*A,u*A)));C=Math.round(C);c.begin();c.moveTo(m+C,v);c.lineTo(m+C,v+u);c.moveTo(m+n-C,v);c.lineTo(m+n-C,v+u);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
+arguments)};mxCellRenderer.registerShape("process",ja);mxCellRenderer.registerShape("process2",ja);mxUtils.extend(aa,mxRectangleShape);aa.prototype.paintBackground=function(c,m,v,n,u){c.setFillColor(mxConstants.NONE);c.rect(m,v,n,u);c.fill()};aa.prototype.paintForeground=function(c,m,v,n,u){};mxCellRenderer.registerShape("transparent",aa);mxUtils.extend(qa,mxHexagon);qa.prototype.size=30;qa.prototype.position=.5;qa.prototype.position2=.5;qa.prototype.base=20;qa.prototype.getLabelMargins=function(){return new mxRectangle(0,
+0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};qa.prototype.isRoundable=function(){return!0};qa.prototype.redrawPath=function(c,m,v,n,u){m=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;v=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var A=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),C=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",
+this.position2)))),ha=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,u-v),new mxPoint(Math.min(n,A+ha),u-v),new mxPoint(C,u),new mxPoint(Math.max(0,A),u-v),new mxPoint(0,u-v)],this.isRounded,m,!0,[4])};mxCellRenderer.registerShape("callout",qa);mxUtils.extend(sa,mxActor);sa.prototype.size=.2;sa.prototype.fixedSize=20;sa.prototype.isRoundable=function(){return!0};sa.prototype.redrawPath=function(c,
+m,v,n,u){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n-m,0),new mxPoint(n,u/2),new mxPoint(n-m,u),new mxPoint(0,u),new mxPoint(m,u/2)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("step",
+sa);mxUtils.extend(L,mxHexagon);L.prototype.size=.25;L.prototype.fixedSize=20;L.prototype.isRoundable=function(){return!0};L.prototype.redrawPath=function(c,m,v,n,u){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(m,
+0),new mxPoint(n-m,0),new mxPoint(n,.5*u),new mxPoint(n-m,u),new mxPoint(m,u),new mxPoint(0,.5*u)],this.isRounded,v,!0)};mxCellRenderer.registerShape("hexagon",L);mxUtils.extend(V,mxRectangleShape);V.prototype.isHtmlAllowed=function(){return!1};V.prototype.paintForeground=function(c,m,v,n,u){var A=Math.min(n/5,u/5)+1;c.begin();c.moveTo(m+n/2,v+A);c.lineTo(m+n/2,v+u-A);c.moveTo(m+A,v+u/2);c.lineTo(m+n-A,v+u/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",
+V);var Za=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var m=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+m,c.y+m,c.width-2*m,c.height-2*m)}return c};mxRhombus.prototype.paintVertexShape=function(c,m,v,n,u){Za.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var A=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
+0);m+=A;v+=A;n-=2*A;u-=2*A;0<n&&0<u&&(c.setShadow(!1),Za.apply(this,[c,m,v,n,u]))}};mxUtils.extend(T,mxRectangleShape);T.prototype.isHtmlAllowed=function(){return!1};T.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var m=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+m,c.y+m,c.width-2*m,c.height-2*m)}return c};T.prototype.paintForeground=function(c,m,v,n,u){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var A=
+Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);m+=A;v+=A;n-=2*A;u-=2*A;0<n&&0<u&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);A=0;do{var C=mxCellRenderer.defaultShapes[this.style["symbol"+A]];if(null!=C){var ha=this.style["symbol"+A+"Align"],K=this.style["symbol"+A+"VerticalAlign"],wa=this.style["symbol"+A+"Width"],ma=this.style["symbol"+A+"Height"],Wa=this.style["symbol"+A+"Spacing"]||0,jb=this.style["symbol"+A+"VSpacing"]||
+Wa,bb=this.style["symbol"+A+"ArcSpacing"];null!=bb&&(bb*=this.getArcSize(n+this.strokewidth,u+this.strokewidth),Wa+=bb,jb+=bb);bb=m;var Ga=v;bb=ha==mxConstants.ALIGN_CENTER?bb+(n-wa)/2:ha==mxConstants.ALIGN_RIGHT?bb+(n-wa-Wa):bb+Wa;Ga=K==mxConstants.ALIGN_MIDDLE?Ga+(u-ma)/2:K==mxConstants.ALIGN_BOTTOM?Ga+(u-ma-jb):Ga+jb;c.save();ha=new C;ha.style=this.style;C.prototype.paintVertexShape.call(ha,c,bb,Ga,wa,ma);c.restore()}A++}while(null!=C)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
+mxCellRenderer.registerShape("ext",T);mxUtils.extend(Y,mxCylinder);Y.prototype.redrawPath=function(c,m,v,n,u,A){A?(c.moveTo(0,0),c.lineTo(n/2,u/2),c.lineTo(n,0),c.end()):(c.moveTo(0,0),c.lineTo(n,0),c.lineTo(n,u),c.lineTo(0,u),c.close())};mxCellRenderer.registerShape("message",Y);mxUtils.extend(W,mxShape);W.prototype.paintBackground=function(c,m,v,n,u){c.translate(m,v);c.ellipse(n/4,0,n/2,u/4);c.fillAndStroke();c.begin();c.moveTo(n/2,u/4);c.lineTo(n/2,2*u/3);c.moveTo(n/2,u/3);c.lineTo(0,u/3);c.moveTo(n/
+2,u/3);c.lineTo(n,u/3);c.moveTo(n/2,2*u/3);c.lineTo(0,u);c.moveTo(n/2,2*u/3);c.lineTo(n,u);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",W);mxUtils.extend(ka,mxShape);ka.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};ka.prototype.paintBackground=function(c,m,v,n,u){c.translate(m,v);c.begin();c.moveTo(0,u/4);c.lineTo(0,3*u/4);c.end();c.stroke();c.begin();c.moveTo(0,u/2);c.lineTo(n/6,u/2);c.end();c.stroke();c.ellipse(n/6,0,5*n/6,u);c.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",
+ka);mxUtils.extend(q,mxEllipse);q.prototype.paintVertexShape=function(c,m,v,n,u){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(m+n/8,v+u);c.lineTo(m+7*n/8,v+u);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",q);mxUtils.extend(F,mxShape);F.prototype.paintVertexShape=function(c,m,v,n,u){c.translate(m,v);c.begin();c.moveTo(n,0);c.lineTo(0,u);c.moveTo(0,0);c.lineTo(n,u);c.end();c.stroke()};mxCellRenderer.registerShape("umlDestroy",F);mxUtils.extend(S,mxShape);
+S.prototype.getLabelBounds=function(c){return new mxRectangle(c.x,c.y+c.height/8,c.width,7*c.height/8)};S.prototype.paintBackground=function(c,m,v,n,u){c.translate(m,v);c.begin();c.moveTo(3*n/8,u/8*1.1);c.lineTo(5*n/8,0);c.end();c.stroke();c.ellipse(0,u/8,n,7*u/8);c.fillAndStroke()};S.prototype.paintForeground=function(c,m,v,n,u){c.begin();c.moveTo(3*n/8,u/8*1.1);c.lineTo(5*n/8,u/4);c.end();c.stroke()};mxCellRenderer.registerShape("umlControl",S);mxUtils.extend(ba,mxRectangleShape);ba.prototype.size=
+40;ba.prototype.isHtmlAllowed=function(){return!1};ba.prototype.getLabelBounds=function(c){var m=Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(c.x,c.y,c.width,m)};ba.prototype.paintBackground=function(c,m,v,n,u){var A=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),C=mxUtils.getValue(this.style,"participant");null==C||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,
+c,m,v,n,A):(C=this.state.view.graph.cellRenderer.getShape(C),null!=C&&C!=ba&&(C=new C,C.apply(this.state),c.save(),C.paintVertexShape(c,m,v,n,A),c.restore()));A<u&&(c.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),c.begin(),c.moveTo(m+n/2,v+A),c.lineTo(m+n/2,v+u),c.end(),c.stroke())};ba.prototype.paintForeground=function(c,m,v,n,u){var A=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,c,m,v,n,
+Math.min(u,A))};mxCellRenderer.registerShape("umlLifeline",ba);mxUtils.extend(U,mxShape);U.prototype.width=60;U.prototype.height=30;U.prototype.corner=10;U.prototype.getLabelMargins=function(c){return new mxRectangle(0,0,c.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),c.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};U.prototype.paintBackground=function(c,m,v,n,u){var A=this.corner,C=Math.min(n,Math.max(A,parseFloat(mxUtils.getValue(this.style,
+"width",this.width)))),ha=Math.min(u,Math.max(1.5*A,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),K=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);K!=mxConstants.NONE&&(c.setFillColor(K),c.rect(m,v,n,u),c.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(c,m,v,n,u),c.setGradient(this.fill,this.gradient,m,v,n,u,this.gradientDirection)):c.setFillColor(this.fill);c.begin();
+c.moveTo(m,v);c.lineTo(m+C,v);c.lineTo(m+C,v+Math.max(0,ha-1.5*A));c.lineTo(m+Math.max(0,C-A),v+ha);c.lineTo(m,v+ha);c.close();c.fillAndStroke();c.begin();c.moveTo(m+C,v);c.lineTo(m+n,v);c.lineTo(m+n,v+u);c.lineTo(m,v+u);c.lineTo(m,v+ha);c.stroke()};mxCellRenderer.registerShape("umlFrame",U);mxPerimeter.CenterPerimeter=function(c,m,v,n){return new mxPoint(c.getCenterX(),c.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(c,
+m,v,n){n=ba.prototype.size;null!=m&&(n=mxUtils.getValue(m.style,"size",n)*m.view.scale);m=parseFloat(m.style[mxConstants.STYLE_STROKEWIDTH]||1)*m.view.scale/2-1;v.x<c.getCenterX()&&(m=-1*(m+1));return new mxPoint(c.getCenterX()+m,Math.min(c.y+c.height,Math.max(c.y+n,v.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(c,m,v,n){n=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",
+mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(c,m,v,n){n=parseFloat(m.style[mxConstants.STYLE_STROKEWIDTH]||1)*m.view.scale/2-1;null!=m.style.backboneSize&&(n+=parseFloat(m.style.backboneSize)*m.view.scale/2-1);if("south"==m.style[mxConstants.STYLE_DIRECTION]||"north"==m.style[mxConstants.STYLE_DIRECTION])return v.x<c.getCenterX()&&(n=-1*(n+1)),new mxPoint(c.getCenterX()+n,Math.min(c.y+c.height,Math.max(c.y,v.y)));v.y<c.getCenterY()&&(n=-1*(n+1));return new mxPoint(Math.min(c.x+
+c.width,Math.max(c.x,v.x)),c.getCenterY()+n)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(c,m,v,n){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(c,new mxRectangle(0,0,0,Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(m.style,"size",qa.prototype.size))*m.view.scale))),m.style),m,v,n)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c,
+m,v,n){var u="0"!=mxUtils.getValue(m.style,"fixedSize","0"),A=u?O.prototype.fixedSize:O.prototype.size;null!=m&&(A=mxUtils.getValue(m.style,"size",A));u&&(A*=m.view.scale);var C=c.x,ha=c.y,K=c.width,wa=c.height;m=null!=m?mxUtils.getValue(m.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;m==mxConstants.DIRECTION_NORTH||m==mxConstants.DIRECTION_SOUTH?(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(C,ha),new mxPoint(C+K,ha+u),new mxPoint(C+
+K,ha+wa),new mxPoint(C,ha+wa-u),new mxPoint(C,ha)]):(u=u?Math.max(0,Math.min(.5*K,A)):K*Math.max(0,Math.min(1,A)),ha=[new mxPoint(C+u,ha),new mxPoint(C+K,ha),new mxPoint(C+K-u,ha+wa),new mxPoint(C,ha+wa),new mxPoint(C+u,ha)]);wa=c.getCenterX();c=c.getCenterY();c=new mxPoint(wa,c);n&&(v.x<C||v.x>C+K?c.y=v.y:c.x=v.x);return mxUtils.getPerimeterPoint(ha,c,v)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,m,v,n){var u="0"!=
+mxUtils.getValue(m.style,"fixedSize","0"),A=u?J.prototype.fixedSize:J.prototype.size;null!=m&&(A=mxUtils.getValue(m.style,"size",A));u&&(A*=m.view.scale);var C=c.x,ha=c.y,K=c.width,wa=c.height;m=null!=m?mxUtils.getValue(m.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;m==mxConstants.DIRECTION_EAST?(u=u?Math.max(0,Math.min(.5*K,A)):K*Math.max(0,Math.min(1,A)),ha=[new mxPoint(C+u,ha),new mxPoint(C+K-u,ha),new mxPoint(C+K,ha+wa),new mxPoint(C,ha+wa),new mxPoint(C+
+u,ha)]):m==mxConstants.DIRECTION_WEST?(u=u?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,A)),ha=[new mxPoint(C,ha),new mxPoint(C+K,ha),new mxPoint(C+K-u,ha+wa),new mxPoint(C+u,ha+wa),new mxPoint(C,ha)]):m==mxConstants.DIRECTION_NORTH?(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(C,ha+u),new mxPoint(C+K,ha),new mxPoint(C+K,ha+wa),new mxPoint(C,ha+wa-u),new mxPoint(C,ha+u)]):(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(C,ha),new mxPoint(C+
+K,ha+u),new mxPoint(C+K,ha+wa-u),new mxPoint(C,ha+wa),new mxPoint(C,ha)]);wa=c.getCenterX();c=c.getCenterY();c=new mxPoint(wa,c);n&&(v.x<C||v.x>C+K?c.y=v.y:c.x=v.x);return mxUtils.getPerimeterPoint(ha,c,v)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,m,v,n){var u="0"!=mxUtils.getValue(m.style,"fixedSize","0"),A=u?sa.prototype.fixedSize:sa.prototype.size;null!=m&&(A=mxUtils.getValue(m.style,"size",A));u&&(A*=m.view.scale);var C=
+c.x,ha=c.y,K=c.width,wa=c.height,ma=c.getCenterX();c=c.getCenterY();m=null!=m?mxUtils.getValue(m.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;m==mxConstants.DIRECTION_EAST?(u=u?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,A)),ha=[new mxPoint(C,ha),new mxPoint(C+K-u,ha),new mxPoint(C+K,c),new mxPoint(C+K-u,ha+wa),new mxPoint(C,ha+wa),new mxPoint(C+u,c),new mxPoint(C,ha)]):m==mxConstants.DIRECTION_WEST?(u=u?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,
+A)),ha=[new mxPoint(C+u,ha),new mxPoint(C+K,ha),new mxPoint(C+K-u,c),new mxPoint(C+K,ha+wa),new mxPoint(C+u,ha+wa),new mxPoint(C,c),new mxPoint(C+u,ha)]):m==mxConstants.DIRECTION_NORTH?(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(C,ha+u),new mxPoint(ma,ha),new mxPoint(C+K,ha+u),new mxPoint(C+K,ha+wa),new mxPoint(ma,ha+wa-u),new mxPoint(C,ha+wa),new mxPoint(C,ha+u)]):(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(C,ha),new mxPoint(ma,ha+
+u),new mxPoint(C+K,ha),new mxPoint(C+K,ha+wa-u),new mxPoint(ma,ha+wa),new mxPoint(C,ha+wa-u),new mxPoint(C,ha)]);ma=new mxPoint(ma,c);n&&(v.x<C||v.x>C+K?ma.y=v.y:ma.x=v.x);return mxUtils.getPerimeterPoint(ha,ma,v)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,m,v,n){var u="0"!=mxUtils.getValue(m.style,"fixedSize","0"),A=u?L.prototype.fixedSize:L.prototype.size;null!=m&&(A=mxUtils.getValue(m.style,"size",A));u&&(A*=m.view.scale);var C=
+c.x,ha=c.y,K=c.width,wa=c.height,ma=c.getCenterX();c=c.getCenterY();m=null!=m?mxUtils.getValue(m.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;m==mxConstants.DIRECTION_NORTH||m==mxConstants.DIRECTION_SOUTH?(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(ma,ha),new mxPoint(C+K,ha+u),new mxPoint(C+K,ha+wa-u),new mxPoint(ma,ha+wa),new mxPoint(C,ha+wa-u),new mxPoint(C,ha+u),new mxPoint(ma,ha)]):(u=u?Math.max(0,Math.min(K,A)):K*Math.max(0,
+Math.min(1,A)),ha=[new mxPoint(C+u,ha),new mxPoint(C+K-u,ha),new mxPoint(C+K,c),new mxPoint(C+K-u,ha+wa),new mxPoint(C+u,ha+wa),new mxPoint(C,c),new mxPoint(C+u,ha)]);ma=new mxPoint(ma,c);n&&(v.x<C||v.x>C+K?ma.y=v.y:ma.x=v.x);return mxUtils.getPerimeterPoint(ha,ma,v)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(ca,mxShape);ca.prototype.size=10;ca.prototype.paintBackground=function(c,m,v,n,u){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size));
+c.translate(m,v);c.ellipse((n-A)/2,0,A,A);c.fillAndStroke();c.begin();c.moveTo(n/2,A);c.lineTo(n/2,u);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",ca);mxUtils.extend(ea,mxShape);ea.prototype.size=10;ea.prototype.inset=2;ea.prototype.paintBackground=function(c,m,v,n,u){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size)),C=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(m,v);c.begin();c.moveTo(n/2,A+C);c.lineTo(n/2,u);c.end();c.stroke();
+c.begin();c.moveTo((n-A)/2-C,A/2);c.quadTo((n-A)/2-C,A+C,n/2,A+C);c.quadTo((n+A)/2+C,A+C,(n+A)/2+C,A/2);c.end();c.stroke()};mxCellRenderer.registerShape("requires",ea);mxUtils.extend(na,mxShape);na.prototype.paintBackground=function(c,m,v,n,u){c.translate(m,v);c.begin();c.moveTo(0,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,0,u);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",na);mxUtils.extend(ra,mxShape);ra.prototype.inset=2;ra.prototype.paintBackground=function(c,m,v,n,u){var A=parseFloat(mxUtils.getValue(this.style,
+"inset",this.inset))+this.strokewidth;c.translate(m,v);c.ellipse(0,A,n-2*A,u-2*A);c.fillAndStroke();c.begin();c.moveTo(n/2,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,n/2,u);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",ra);mxUtils.extend(ya,mxCylinder);ya.prototype.jettyWidth=20;ya.prototype.jettyHeight=10;ya.prototype.redrawPath=function(c,m,v,n,u,A){var C=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));m=parseFloat(mxUtils.getValue(this.style,"jettyHeight",
+this.jettyHeight));v=C/2;C=v+C/2;var ha=Math.min(m,u-m),K=Math.min(ha+2*m,u-m);A?(c.moveTo(v,ha),c.lineTo(C,ha),c.lineTo(C,ha+m),c.lineTo(v,ha+m),c.moveTo(v,K),c.lineTo(C,K),c.lineTo(C,K+m),c.lineTo(v,K+m)):(c.moveTo(v,0),c.lineTo(n,0),c.lineTo(n,u),c.lineTo(v,u),c.lineTo(v,K+m),c.lineTo(0,K+m),c.lineTo(0,K),c.lineTo(v,K),c.lineTo(v,ha+m),c.lineTo(0,ha+m),c.lineTo(0,ha),c.lineTo(v,ha),c.close());c.end()};mxCellRenderer.registerShape("module",ya);mxUtils.extend(va,mxCylinder);va.prototype.jettyWidth=
+32;va.prototype.jettyHeight=12;va.prototype.redrawPath=function(c,m,v,n,u,A){var C=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));m=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));v=C/2;C=v+C/2;var ha=.3*u-m/2,K=.7*u-m/2;A?(c.moveTo(v,ha),c.lineTo(C,ha),c.lineTo(C,ha+m),c.lineTo(v,ha+m),c.moveTo(v,K),c.lineTo(C,K),c.lineTo(C,K+m),c.lineTo(v,K+m)):(c.moveTo(v,0),c.lineTo(n,0),c.lineTo(n,u),c.lineTo(v,u),c.lineTo(v,K+m),c.lineTo(0,K+m),c.lineTo(0,K),c.lineTo(v,
+K),c.lineTo(v,ha+m),c.lineTo(0,ha+m),c.lineTo(0,ha),c.lineTo(v,ha),c.close());c.end()};mxCellRenderer.registerShape("component",va);mxUtils.extend(Da,mxRectangleShape);Da.prototype.paintForeground=function(c,m,v,n,u){var A=n/2,C=u/2,ha=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c.begin();this.addPoints(c,[new mxPoint(m+A,v),new mxPoint(m+n,v+C),new mxPoint(m+A,v+u),new mxPoint(m,v+C)],this.isRounded,ha,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
+arguments)};mxCellRenderer.registerShape("associativeEntity",Da);mxUtils.extend(pa,mxDoubleEllipse);pa.prototype.outerStroke=!0;pa.prototype.paintVertexShape=function(c,m,v,n,u){var A=Math.min(4,Math.min(n/5,u/5));0<n&&0<u&&(c.ellipse(m+A,v+A,n-2*A,u-2*A),c.fillAndStroke());c.setShadow(!1);this.outerStroke&&(c.ellipse(m,v,n,u),c.stroke())};mxCellRenderer.registerShape("endState",pa);mxUtils.extend(Aa,pa);Aa.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",Aa);mxUtils.extend(xa,mxArrowConnector);
+xa.prototype.defaultWidth=4;xa.prototype.isOpenEnded=function(){return!0};xa.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};xa.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",xa);mxUtils.extend(Ma,mxArrowConnector);Ma.prototype.defaultWidth=10;Ma.prototype.defaultArrowWidth=20;Ma.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,
+"startWidth",this.defaultArrowWidth)};Ma.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Ma.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Ma);mxUtils.extend(Oa,mxActor);Oa.prototype.size=30;Oa.prototype.isRoundable=function(){return!0};Oa.prototype.redrawPath=function(c,m,v,n,u){m=Math.min(u,parseFloat(mxUtils.getValue(this.style,
+"size",this.size)));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,u),new mxPoint(0,m),new mxPoint(n,0),new mxPoint(n,u)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("manualInput",Oa);mxUtils.extend(Na,mxRectangleShape);Na.prototype.dx=20;Na.prototype.dy=20;Na.prototype.isHtmlAllowed=function(){return!1};Na.prototype.paintForeground=function(c,m,v,n,u){mxRectangleShape.prototype.paintForeground.apply(this,arguments);
+var A=0;if(this.isRounded){var C=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;A=Math.max(A,Math.min(n*C,u*C))}C=Math.max(A,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));A=Math.max(A,Math.min(u,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.begin();c.moveTo(m,v+A);c.lineTo(m+n,v+A);c.end();c.stroke();c.begin();c.moveTo(m+C,v);c.lineTo(m+C,v+u);c.end();c.stroke()};mxCellRenderer.registerShape("internalStorage",Na);
+mxUtils.extend(La,mxActor);La.prototype.dx=20;La.prototype.dy=20;La.prototype.redrawPath=function(c,m,v,n,u){m=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));v=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,v),new mxPoint(m,v),
+new mxPoint(m,u),new mxPoint(0,u)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("corner",La);mxUtils.extend(Ba,mxActor);Ba.prototype.redrawPath=function(c,m,v,n,u){c.moveTo(0,0);c.lineTo(0,u);c.end();c.moveTo(n,0);c.lineTo(n,u);c.end();c.moveTo(0,u/2);c.lineTo(n,u/2);c.end()};mxCellRenderer.registerShape("crossbar",Ba);mxUtils.extend(ab,mxActor);ab.prototype.dx=20;ab.prototype.dy=20;ab.prototype.redrawPath=function(c,m,v,n,u){m=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,
+"dx",this.dx))));v=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,v),new mxPoint((n+m)/2,v),new mxPoint((n+m)/2,u),new mxPoint((n-m)/2,u),new mxPoint((n-m)/2,v),new mxPoint(0,v)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("tee",ab);mxUtils.extend(Xa,
+mxActor);Xa.prototype.arrowWidth=.3;Xa.prototype.arrowSize=.2;Xa.prototype.redrawPath=function(c,m,v,n,u){var A=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));m=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));v=(u-A)/2;A=v+A;var C=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(n-m,v),new mxPoint(n-m,0),new mxPoint(n,u/2),new mxPoint(n-
+m,u),new mxPoint(n-m,A),new mxPoint(0,A)],this.isRounded,C,!0);c.end()};mxCellRenderer.registerShape("singleArrow",Xa);mxUtils.extend(x,mxActor);x.prototype.redrawPath=function(c,m,v,n,u){var A=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Xa.prototype.arrowWidth))));m=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Xa.prototype.arrowSize))));v=(u-A)/2;A=v+A;var C=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
+2;this.addPoints(c,[new mxPoint(0,u/2),new mxPoint(m,0),new mxPoint(m,v),new mxPoint(n-m,v),new mxPoint(n-m,0),new mxPoint(n,u/2),new mxPoint(n-m,u),new mxPoint(n-m,A),new mxPoint(m,A),new mxPoint(m,u)],this.isRounded,C,!0);c.end()};mxCellRenderer.registerShape("doubleArrow",x);mxUtils.extend(H,mxActor);H.prototype.size=.1;H.prototype.fixedSize=20;H.prototype.redrawPath=function(c,m,v,n,u){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,
+"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(m,0);c.lineTo(n,0);c.quadTo(n-2*m,u/2,n,u);c.lineTo(m,u);c.quadTo(m-2*m,u/2,m,0);c.close();c.end()};mxCellRenderer.registerShape("dataStorage",H);mxUtils.extend(P,mxActor);P.prototype.redrawPath=function(c,m,v,n,u){c.moveTo(0,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,0,u);c.close();c.end()};mxCellRenderer.registerShape("or",P);mxUtils.extend(X,mxActor);X.prototype.redrawPath=function(c,
+m,v,n,u){c.moveTo(0,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,0,u);c.quadTo(n/2,u/2,0,0);c.close();c.end()};mxCellRenderer.registerShape("xor",X);mxUtils.extend(Z,mxActor);Z.prototype.size=20;Z.prototype.isRoundable=function(){return!0};Z.prototype.redrawPath=function(c,m,v,n,u){m=Math.min(n/2,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(m,0),new mxPoint(n-m,0),new mxPoint(n,
+.8*m),new mxPoint(n,u),new mxPoint(0,u),new mxPoint(0,.8*m)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("loopLimit",Z);mxUtils.extend(fa,mxActor);fa.prototype.size=.375;fa.prototype.isRoundable=function(){return!0};fa.prototype.redrawPath=function(c,m,v,n,u){m=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,
+u-m),new mxPoint(n/2,u),new mxPoint(0,u-m)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",fa);mxUtils.extend(la,mxEllipse);la.prototype.paintVertexShape=function(c,m,v,n,u){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(m+n/2,v+u);c.lineTo(m+n,v+u);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",la);mxUtils.extend(za,mxEllipse);za.prototype.paintVertexShape=function(c,m,v,n,u){mxEllipse.prototype.paintVertexShape.apply(this,
+arguments);c.setShadow(!1);c.begin();c.moveTo(m,v+u/2);c.lineTo(m+n,v+u/2);c.end();c.stroke();c.begin();c.moveTo(m+n/2,v);c.lineTo(m+n/2,v+u);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse",za);mxUtils.extend(ua,mxEllipse);ua.prototype.paintVertexShape=function(c,m,v,n,u){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(m+.145*n,v+.145*u);c.lineTo(m+.855*n,v+.855*u);c.end();c.stroke();c.begin();c.moveTo(m+.855*n,v+.145*u);c.lineTo(m+.145*n,
+v+.855*u);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",ua);mxUtils.extend(oa,mxRhombus);oa.prototype.paintVertexShape=function(c,m,v,n,u){mxRhombus.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(m,v+u/2);c.lineTo(m+n,v+u/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",oa);mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(c,m,v,n,u){c.begin();c.moveTo(m,v);c.lineTo(m+n,v);c.lineTo(m+n/2,v+u/2);c.close();c.fillAndStroke();
+c.begin();c.moveTo(m,v+u);c.lineTo(m+n,v+u);c.lineTo(m+n/2,v+u/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",ta);mxUtils.extend(Ea,mxEllipse);Ea.prototype.paintVertexShape=function(c,m,v,n,u){var A=c.state.strokeWidth/2,C=10+2*A,ha=v+u-C/2;c.begin();c.moveTo(m,v);c.lineTo(m,v+u);c.moveTo(m+A,ha);c.lineTo(m+A+C,ha-C/2);c.moveTo(m+A,ha);c.lineTo(m+A+C,ha+C/2);c.moveTo(m+A,ha);c.lineTo(m+n-A,ha);c.moveTo(m+n,v);c.lineTo(m+n,v+u);c.moveTo(m+n-A,ha);c.lineTo(m+n-C-A,ha-C/2);c.moveTo(m+
+n-A,ha);c.lineTo(m+n-C-A,ha+C/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",Ea);mxUtils.extend(Fa,mxEllipse);Fa.prototype.drawHidden=!0;Fa.prototype.paintVertexShape=function(c,m,v,n,u){this.outline||c.setStrokeColor(null);if(null!=this.style){var A=c.pointerEvents,C=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||C||(c.pointerEvents=!1);var ha="1"==mxUtils.getValue(this.style,"top","1"),K="1"==mxUtils.getValue(this.style,
+"left","1"),wa="1"==mxUtils.getValue(this.style,"right","1"),ma="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||C||this.outline||ha||wa||ma||K?(c.rect(m,v,n,u),c.fill(),c.pointerEvents=A,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(m,v),this.outline||ha?c.lineTo(m+n,v):c.moveTo(m+n,v),this.outline||wa?c.lineTo(m+n,v+u):c.moveTo(m+n,v+u),this.outline||ma?c.lineTo(m,v+u):c.moveTo(m,v+u),(this.outline||K)&&c.lineTo(m,v),c.end(),c.stroke(),c.setLineCap("flat")):
+c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Fa);mxUtils.extend(Pa,mxEllipse);Pa.prototype.paintVertexShape=function(c,m,v,n,u){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,"line")?(c.moveTo(m+n/2,v),c.lineTo(m+n/2,v+u)):(c.moveTo(m,v+u/2),c.lineTo(m+n,v+u/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",Pa);mxUtils.extend(Ra,mxActor);Ra.prototype.redrawPath=function(c,
+m,v,n,u){m=Math.min(n,u/2);c.moveTo(0,0);c.lineTo(n-m,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,n-m,u);c.lineTo(0,u);c.close();c.end()};mxCellRenderer.registerShape("delay",Ra);mxUtils.extend(Ca,mxActor);Ca.prototype.size=.2;Ca.prototype.redrawPath=function(c,m,v,n,u){m=Math.min(u,n);var A=Math.max(0,Math.min(m,m*parseFloat(mxUtils.getValue(this.style,"size",this.size))));m=(u-A)/2;v=m+A;var C=(n-A)/2;A=C+A;c.moveTo(0,m);c.lineTo(C,m);c.lineTo(C,0);c.lineTo(A,0);c.lineTo(A,m);c.lineTo(n,m);c.lineTo(n,v);
+c.lineTo(A,v);c.lineTo(A,u);c.lineTo(C,u);c.lineTo(C,v);c.lineTo(0,v);c.close();c.end()};mxCellRenderer.registerShape("cross",Ca);mxUtils.extend(Ja,mxActor);Ja.prototype.size=.25;Ja.prototype.redrawPath=function(c,m,v,n,u){m=Math.min(n,u/2);v=Math.min(n-m,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*n);c.moveTo(0,u/2);c.lineTo(v,0);c.lineTo(n-m,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,n-m,u);c.lineTo(v,u);c.close();c.end()};mxCellRenderer.registerShape("display",Ja);mxUtils.extend(Qa,
+mxActor);Qa.prototype.cst={RECT2:"mxgraph.basic.rect"};Qa.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(c,l,v,n,u){c.translate(l,
-v);this.strictDrawShape(c,0,0,n,u)};Oa.prototype.strictDrawShape=function(c,l,v,n,u,A){var B=A&&A.rectStyle?A.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),ca=A&&A.absoluteCornerSize?A.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),K=A&&A.size?A.size:Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),wa=A&&A.rectOutline?A.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),ma=A&&A.indent?
-A.indent:Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),Xa=A&&A.dashed?A.dashed:mxUtils.getValue(this.style,"dashed",!1),jb=A&&A.dashPattern?A.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),bb=A&&A.relIndent?A.relIndent:Math.max(0,Math.min(50,ma)),Ga=A&&A.top?A.top:mxUtils.getValue(this.style,"top",!0),La=A&&A.right?A.right:mxUtils.getValue(this.style,"right",!0),Ja=A&&A.bottom?A.bottom:mxUtils.getValue(this.style,"bottom",!0),Ha=A&&A.left?A.left:
-mxUtils.getValue(this.style,"left",!0),Ra=A&&A.topLeftStyle?A.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Ua=A&&A.topRightStyle?A.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Va=A&&A.bottomRightStyle?A.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),Wa=A&&A.bottomLeftStyle?A.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Fb=A&&A.fillColor?A.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");
+dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];Qa.prototype.paintVertexShape=function(c,m,v,n,u){c.translate(m,
+v);this.strictDrawShape(c,0,0,n,u)};Qa.prototype.strictDrawShape=function(c,m,v,n,u,A){var C=A&&A.rectStyle?A.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),ha=A&&A.absoluteCornerSize?A.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),K=A&&A.size?A.size:Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),wa=A&&A.rectOutline?A.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),ma=A&&A.indent?
+A.indent:Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),Wa=A&&A.dashed?A.dashed:mxUtils.getValue(this.style,"dashed",!1),jb=A&&A.dashPattern?A.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),bb=A&&A.relIndent?A.relIndent:Math.max(0,Math.min(50,ma)),Ga=A&&A.top?A.top:mxUtils.getValue(this.style,"top",!0),Ka=A&&A.right?A.right:mxUtils.getValue(this.style,"right",!0),Ia=A&&A.bottom?A.bottom:mxUtils.getValue(this.style,"bottom",!0),Ha=A&&A.left?A.left:
+mxUtils.getValue(this.style,"left",!0),Sa=A&&A.topLeftStyle?A.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Ta=A&&A.topRightStyle?A.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Ua=A&&A.bottomRightStyle?A.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),Va=A&&A.bottomLeftStyle?A.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Fb=A&&A.fillColor?A.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");
A&&A.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var Gb=A&&A.strokeWidth?A.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),Db=A&&A.fillColor2?A.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),Eb=A&&A.gradientColor2?A.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),Hb=A&&A.gradientDirection2?A.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Ib=A&&A.opacity?A.opacity:mxUtils.getValue(this.style,"opacity","100"),
-Jb=Math.max(0,Math.min(50,K));A=Oa.prototype;c.setDashed(Xa);jb&&""!=jb&&c.setDashPattern(jb);c.setStrokeWidth(Gb);K=Math.min(.5*u,.5*n,K);ca||(K=Jb*Math.min(n,u)/100);K=Math.min(K,.5*Math.min(n,u));ca||(ma=Math.min(bb*Math.min(n,u)/100));ma=Math.min(ma,.5*Math.min(n,u)-K);(Ga||La||Ja||Ha)&&"frame"!=wa&&(c.begin(),Ga?A.moveNW(c,l,v,n,u,B,Ra,K,Ha):c.moveTo(0,0),Ga&&A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),La&&A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),Ja&&
-A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),Ha&&A.paintSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(Db),Xa=ca=Ib,"none"==Db&&(ca=0),"none"==Eb&&(Xa=0),c.setGradient(Db,Eb,0,0,n,u,Hb,ca,Xa),c.begin(),Ga?A.moveNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha):c.moveTo(ma,0),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),Ha&&Ja&&A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),Ja&&La&&A.paintSEInner(c,
-l,v,n,u,B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),La&&Ga&&A.paintNEInner(c,l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),Ga&&Ha&&A.paintNWInner(c,l,v,n,u,B,Ra,K,ma),c.fill(),"none"==Fb&&(c.begin(),A.paintFolds(c,l,v,n,u,B,Ra,Ua,Va,Wa,K,Ga,La,Ja,Ha),c.stroke()));Ga||La||Ja||!Ha?Ga||La||!Ja||Ha?!Ga&&!La&&Ja&&Ha?"frame"!=wa?(c.begin(),A.moveSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.paintSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),"double"==
-wa&&(A.moveNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja)),c.stroke()):(c.begin(),A.moveSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.paintSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.lineNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),c.close(),
-c.fillAndStroke()):Ga||!La||Ja||Ha?!Ga&&La&&!Ja&&Ha?"frame"!=wa?(c.begin(),A.moveSW(c,l,v,n,u,B,Ra,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),"double"==wa&&(A.moveNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha)),c.stroke(),c.begin(),A.moveNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),"double"==wa&&(A.moveSEInner(c,l,v,n,u,B,Va,K,ma,Ja),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La)),c.stroke()):(c.begin(),A.moveSW(c,l,v,n,u,B,Ra,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,
-K,Ga),A.lineNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),c.close(),c.fillAndStroke(),c.begin(),A.moveNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.lineSEInner(c,l,v,n,u,B,Va,K,ma,Ja),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),c.close(),c.fillAndStroke()):!Ga&&La&&Ja&&!Ha?"frame"!=wa?(c.begin(),A.moveNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),"double"==wa&&(A.moveSWInner(c,
-l,v,n,u,B,Wa,K,ma,Ha),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),A.paintSEInner(c,l,v,n,u,B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La)),c.stroke()):(c.begin(),A.moveNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.lineSWInner(c,l,v,n,u,B,Wa,K,ma,Ha),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),A.paintSEInner(c,l,v,n,u,B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),c.close(),c.fillAndStroke()):!Ga&&
-La&&Ja&&Ha?"frame"!=wa?(c.begin(),A.moveNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.paintSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),"double"==wa&&(A.moveNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),A.paintSEInner(c,l,v,n,u,B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La)),c.stroke()):
-(c.begin(),A.moveNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.paintSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.lineNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),A.paintSEInner(c,l,v,n,u,B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),c.close(),c.fillAndStroke()):!Ga||La||Ja||Ha?
-Ga&&!La&&!Ja&&Ha?"frame"!=wa?(c.begin(),A.moveSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),"double"==wa&&(A.moveNEInner(c,l,v,n,u,B,Ua,K,ma,La),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),A.paintNWInner(c,l,v,n,u,B,Ra,K,ma),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.lineNEInner(c,
-l,v,n,u,B,Ua,K,ma,La),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),A.paintNWInner(c,l,v,n,u,B,Ra,K,ma),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),c.close(),c.fillAndStroke()):Ga&&!La&&Ja&&!Ha?"frame"!=wa?(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),"double"==wa&&(A.moveNEInner(c,l,v,n,u,B,Ua,K,ma,La),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga)),c.stroke(),c.begin(),A.moveSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),"double"==wa&&(A.moveSWInner(c,l,v,n,u,B,Wa,
-K,ma,Ha),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja)),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.lineNEInner(c,l,v,n,u,B,Ua,K,ma,La),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),c.close(),c.fillAndStroke(),c.begin(),A.moveSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.lineSWInner(c,l,v,n,u,B,Wa,K,ma,Ha),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),c.close(),c.fillAndStroke()):Ga&&!La&&Ja&&Ha?"frame"!=wa?(c.begin(),A.moveSE(c,l,v,n,u,B,Va,
-K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.paintSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),"double"==wa&&(A.moveNEInner(c,l,v,n,u,B,Ua,K,ma,La),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),A.paintNWInner(c,l,v,n,u,B,Ra,K,ma),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja)),c.stroke()):(c.begin(),A.moveSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,
-v,n,u,B,Wa,K,Ha),A.paintSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.lineNEInner(c,l,v,n,u,B,Ua,K,ma,La),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),A.paintNWInner(c,l,v,n,u,B,Ra,K,ma),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),c.close(),c.fillAndStroke()):Ga&&La&&!Ja&&!Ha?"frame"!=wa?(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,
-l,v,n,u,B,Ua,K,La),A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),"double"==wa&&(A.moveSEInner(c,l,v,n,u,B,Va,K,ma,Ja),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),A.paintNEInner(c,l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga)),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.lineSEInner(c,l,v,n,u,B,Va,K,ma,Ja),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),A.paintNEInner(c,
-l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),c.close(),c.fillAndStroke()):Ga&&La&&!Ja&&Ha?"frame"!=wa?(c.begin(),A.moveSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),"double"==wa&&(A.moveSEInner(c,l,v,n,u,B,Va,K,ma,Ja),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),A.paintNEInner(c,l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),A.paintNWInner(c,
-l,v,n,u,B,Ra,K,ma),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.lineSEInner(c,l,v,n,u,B,Va,K,ma,Ja),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),A.paintNEInner(c,l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),A.paintNWInner(c,l,v,n,u,B,Ra,K,ma),A.paintLeftInner(c,l,v,n,
-u,B,Wa,K,ma,Ja,Ha),c.close(),c.fillAndStroke()):Ga&&La&&Ja&&!Ha?"frame"!=wa?(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),"double"==wa&&(A.moveSWInner(c,l,v,n,u,B,Wa,K,ma,Ha),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),A.paintSEInner(c,l,v,n,u,B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),A.paintNEInner(c,l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,
-l,v,n,u,B,Ra,K,ma,Ha,Ga)),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.lineSWInner(c,l,v,n,u,B,Wa,K,ma,Ha),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),A.paintSEInner(c,l,v,n,u,B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),A.paintNEInner(c,l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),c.close(),c.fillAndStroke()):
-Ga&&La&&Ja&&Ha&&("frame"!=wa?(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.paintSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),c.close(),"double"==wa&&(A.moveSWInner(c,l,v,n,u,B,Wa,K,ma,Ha),A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),A.paintSEInner(c,l,v,n,u,
-B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),A.paintNEInner(c,l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),A.paintNWInner(c,l,v,n,u,B,Ra,K,ma),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),c.close()),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.paintSW(c,l,v,n,u,B,Wa,K,Ja),
-A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),c.close(),A.moveSWInner(c,l,v,n,u,B,Wa,K,ma,Ha),A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),A.paintSEInner(c,l,v,n,u,B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),A.paintNEInner(c,l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),A.paintNWInner(c,l,v,n,u,B,Ra,K,ma),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),c.close(),c.fillAndStroke())):"frame"!=wa?(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,
-l,v,n,u,B,Ua,K,La),"double"==wa&&(A.moveNEInner(c,l,v,n,u,B,Ua,K,ma,La),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga)),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.lineNEInner(c,l,v,n,u,B,Ua,K,ma,La),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),c.close(),c.fillAndStroke()):"frame"!=wa?(c.begin(),A.moveNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),"double"==wa&&(A.moveSEInner(c,l,v,n,u,B,Va,K,ma,Ja),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La)),c.stroke()):
-(c.begin(),A.moveNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.lineSEInner(c,l,v,n,u,B,Va,K,ma,Ja),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),c.close(),c.fillAndStroke()):"frame"!=wa?(c.begin(),A.moveSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),"double"==wa&&(A.moveSWInner(c,l,v,n,u,B,Wa,K,ma,Ha),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja)),c.stroke()):(c.begin(),A.moveSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.lineSWInner(c,l,v,n,u,B,Wa,K,ma,Ha),
-A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),c.close(),c.fillAndStroke()):"frame"!=wa?(c.begin(),A.moveSW(c,l,v,n,u,B,Ra,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),"double"==wa&&(A.moveNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,v,n,u,B,Ra,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.lineNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),c.close(),c.fillAndStroke());c.begin();A.paintFolds(c,l,v,n,u,B,Ra,Ua,
-Va,Wa,K,Ga,La,Ja,Ha);c.stroke()};Oa.prototype.moveNW=function(c,l,v,n,u,A,B,ca,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(0,0):c.moveTo(0,ca)};Oa.prototype.moveNE=function(c,l,v,n,u,A,B,ca,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(n,0):c.moveTo(n-ca,0)};Oa.prototype.moveSE=function(c,l,v,n,u,A,B,ca,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(n,u):c.moveTo(n,u-ca)};Oa.prototype.moveSW=function(c,l,v,n,u,A,B,ca,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(0,
-u):c.moveTo(ca,u)};Oa.prototype.paintNW=function(c,l,v,n,u,A,B,ca,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ca,ca,0,0,l,ca,0)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(ca,0);else c.lineTo(0,0)};Oa.prototype.paintTop=function(c,l,v,n,u,A,B,ca,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(n,0):c.lineTo(n-ca,0)};Oa.prototype.paintNE=
-function(c,l,v,n,u,A,B,ca,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ca,ca,0,0,l,n,ca)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(n,ca);else c.lineTo(n,0)};Oa.prototype.paintRight=function(c,l,v,n,u,A,B,ca,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(n,u):c.lineTo(n,u-ca)};Oa.prototype.paintLeft=function(c,l,v,n,u,A,B,ca,K){"square"==
-B||"default"==B&&"square"==A||!K?c.lineTo(0,0):c.lineTo(0,ca)};Oa.prototype.paintSE=function(c,l,v,n,u,A,B,ca,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ca,ca,0,0,l,n-ca,u)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(n-ca,u);else c.lineTo(n,u)};Oa.prototype.paintBottom=function(c,l,v,n,u,A,B,ca,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(0,
-u):c.lineTo(ca,u)};Oa.prototype.paintSW=function(c,l,v,n,u,A,B,ca,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ca,ca,0,0,l,0,u-ca)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(0,u-ca);else c.lineTo(0,u)};Oa.prototype.paintNWInner=function(c,l,v,n,u,A,B,ca,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ca-.5*K,ca-.5*K,0,0,0,K,.5*K+ca);else if("invRound"==
-B||"default"==B&&"invRound"==A)c.arcTo(ca+K,ca+K,0,0,1,K,K+ca);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(K,.5*K+ca);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(K+ca,K+ca),c.lineTo(K,K+ca)};Oa.prototype.paintTopInner=function(c,l,v,n,u,A,B,ca,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(0,K):wa&&!ma?c.lineTo(K,0):wa?"square"==B||"default"==B&&"square"==A?c.lineTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(ca+.5*K,K):c.lineTo(ca+K,K):c.lineTo(0,
-K):c.lineTo(0,0)};Oa.prototype.paintNEInner=function(c,l,v,n,u,A,B,ca,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ca-.5*K,ca-.5*K,0,0,0,n-ca-.5*K,K);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(ca+K,ca+K,0,0,1,n-ca-K,K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(n-ca-.5*K,K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(n-ca-K,ca+K),c.lineTo(n-ca-K,K)};Oa.prototype.paintRightInner=function(c,l,v,n,u,A,B,ca,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(n-K,0):wa&&!ma?c.lineTo(n,
-K):wa?"square"==B||"default"==B&&"square"==A?c.lineTo(n-K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(n-K,ca+.5*K):c.lineTo(n-K,ca+K):c.lineTo(n-K,0):c.lineTo(n,0)};Oa.prototype.paintLeftInner=function(c,l,v,n,u,A,B,ca,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(K,u):wa&&!ma?c.lineTo(0,u-K):wa?"square"==B||"default"==B&&"square"==A?c.lineTo(K,u-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,u-ca-.5*K):c.lineTo(K,u-ca-K):
-c.lineTo(K,u):c.lineTo(0,u)};Oa.prototype.paintSEInner=function(c,l,v,n,u,A,B,ca,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ca-.5*K,ca-.5*K,0,0,0,n-K,u-ca-.5*K);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(ca+K,ca+K,0,0,1,n-K,u-ca-K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(n-K,u-ca-.5*K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(n-ca-K,u-ca-K),c.lineTo(n-K,u-ca-K)};Oa.prototype.paintBottomInner=function(c,l,v,n,u,A,B,ca,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(n,
-u-K):wa&&!ma?c.lineTo(n-K,u):"square"==B||"default"==B&&"square"==A||!wa?c.lineTo(n-K,u-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(n-ca-.5*K,u-K):c.lineTo(n-ca-K,u-K):c.lineTo(n,u)};Oa.prototype.paintSWInner=function(c,l,v,n,u,A,B,ca,K,wa){if(!wa)c.lineTo(K,u);else if("square"==B||"default"==B&&"square"==A)c.lineTo(K,u-K);else if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ca-.5*K,ca-.5*K,0,0,0,ca+.5*K,u-K);else if("invRound"==B||"default"==B&&"invRound"==
-A)c.arcTo(ca+K,ca+K,0,0,1,ca+K,u-K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(ca+.5*K,u-K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(K+ca,u-ca-K),c.lineTo(K+ca,u-K)};Oa.prototype.moveSWInner=function(c,l,v,n,u,A,B,ca,K,wa){wa?"square"==B||"default"==B&&"square"==A?c.moveTo(K,u-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(K,u-ca-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(K,u-ca-K):
-c.moveTo(0,u-K)};Oa.prototype.lineSWInner=function(c,l,v,n,u,A,B,ca,K,wa){wa?"square"==B||"default"==B&&"square"==A?c.lineTo(K,u-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,u-ca-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(K,u-ca-K):c.lineTo(0,u-K)};Oa.prototype.moveSEInner=function(c,l,v,n,u,A,B,ca,K,wa){wa?"square"==B||"default"==B&&"square"==A?c.moveTo(n-K,u-K):"rounded"==B||"default"==B&&"rounded"==
-A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(n-K,u-ca-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(n-K,u-ca-K):c.moveTo(n-K,u)};Oa.prototype.lineSEInner=function(c,l,v,n,u,A,B,ca,K,wa){wa?"square"==B||"default"==B&&"square"==A?c.lineTo(n-K,u-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(n-K,u-ca-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(n-K,u-ca-K):
-c.lineTo(n-K,u)};Oa.prototype.moveNEInner=function(c,l,v,n,u,A,B,ca,K,wa){wa?"square"==B||"default"==B&&"square"==A||wa?c.moveTo(n-K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(n-K,ca+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(n-K,ca+K):c.moveTo(n,K)};Oa.prototype.lineNEInner=function(c,l,v,n,u,A,B,ca,K,wa){wa?"square"==B||"default"==B&&"square"==A||wa?c.lineTo(n-K,K):"rounded"==B||"default"==B&&"rounded"==
-A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(n-K,ca+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(n-K,ca+K):c.lineTo(n,K)};Oa.prototype.moveNWInner=function(c,l,v,n,u,A,B,ca,K,wa,ma){wa||ma?!wa&&ma?c.moveTo(K,0):wa&&!ma?c.moveTo(0,K):"square"==B||"default"==B&&"square"==A?c.moveTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(K,ca+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==
-B&&"fold"==A)&&c.moveTo(K,ca+K):c.moveTo(0,0)};Oa.prototype.lineNWInner=function(c,l,v,n,u,A,B,ca,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(K,0):wa&&!ma?c.lineTo(0,K):"square"==B||"default"==B&&"square"==A?c.lineTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,ca+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(K,ca+K):c.lineTo(0,0)};Oa.prototype.paintFolds=function(c,l,v,n,u,A,B,ca,K,wa,ma,Xa,jb,bb,Ga){if("fold"==
-A||"fold"==B||"fold"==ca||"fold"==K||"fold"==wa)("fold"==B||"default"==B&&"fold"==A)&&Xa&&Ga&&(c.moveTo(0,ma),c.lineTo(ma,ma),c.lineTo(ma,0)),("fold"==ca||"default"==ca&&"fold"==A)&&Xa&&jb&&(c.moveTo(n-ma,0),c.lineTo(n-ma,ma),c.lineTo(n,ma)),("fold"==K||"default"==K&&"fold"==A)&&bb&&jb&&(c.moveTo(n-ma,u),c.lineTo(n-ma,u-ma),c.lineTo(n,u-ma)),("fold"==wa||"default"==wa&&"fold"==A)&&bb&&Ga&&(c.moveTo(0,u-ma),c.lineTo(ma,u-ma),c.lineTo(ma,u))};mxCellRenderer.registerShape(Oa.prototype.cst.RECT2,Oa);
-Oa.prototype.constraints=null;mxUtils.extend(Ya,mxConnector);Ya.prototype.origPaintEdgeShape=Ya.prototype.paintEdgeShape;Ya.prototype.paintEdgeShape=function(c,l,v){for(var n=[],u=0;u<l.length;u++)n.push(mxUtils.clone(l[u]));u=c.state.dashed;var A=c.state.fixDash;Ya.prototype.origPaintEdgeShape.apply(this,[c,n,v]);3<=c.state.strokeWidth&&(n=mxUtils.getValue(this.style,"fillColor",null),null!=n&&(c.setStrokeColor(n),c.setStrokeWidth(c.state.strokeWidth-2),c.setDashed(u,A),Ya.prototype.origPaintEdgeShape.apply(this,
-[c,l,v])))};mxCellRenderer.registerShape("filledEdge",Ya);"undefined"!==typeof StyleFormatPanel&&function(){var c=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var l=this.editorUi.getSelectionState(),v=c.apply(this,arguments);"umlFrame"==l.style.shape&&v.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return v}}();mxMarker.addMarker("dash",function(c,l,v,n,u,A,B,ca,K,wa){var ma=u*(B+K+1),Xa=A*(B+K+1);return function(){c.begin();
-c.moveTo(n.x-ma/2-Xa/2,n.y-Xa/2+ma/2);c.lineTo(n.x+Xa/2-3*ma/2,n.y-3*Xa/2-ma/2);c.stroke()}});mxMarker.addMarker("box",function(c,l,v,n,u,A,B,ca,K,wa){var ma=u*(B+K+1),Xa=A*(B+K+1),jb=n.x+ma/2,bb=n.y+Xa/2;n.x-=ma;n.y-=Xa;return function(){c.begin();c.moveTo(jb-ma/2-Xa/2,bb-Xa/2+ma/2);c.lineTo(jb-ma/2+Xa/2,bb-Xa/2-ma/2);c.lineTo(jb+Xa/2-3*ma/2,bb-3*Xa/2-ma/2);c.lineTo(jb-Xa/2-3*ma/2,bb-3*Xa/2+ma/2);c.close();wa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,l,v,n,u,A,B,ca,K,
-wa){var ma=u*(B+K+1),Xa=A*(B+K+1);return function(){c.begin();c.moveTo(n.x-ma/2-Xa/2,n.y-Xa/2+ma/2);c.lineTo(n.x+Xa/2-3*ma/2,n.y-3*Xa/2-ma/2);c.moveTo(n.x-ma/2+Xa/2,n.y-Xa/2-ma/2);c.lineTo(n.x-Xa/2-3*ma/2,n.y-3*Xa/2+ma/2);c.stroke()}});mxMarker.addMarker("circle",db);mxMarker.addMarker("circlePlus",function(c,l,v,n,u,A,B,ca,K,wa){var ma=n.clone(),Xa=db.apply(this,arguments),jb=u*(B+2*K),bb=A*(B+2*K);return function(){Xa.apply(this,arguments);c.begin();c.moveTo(ma.x-u*K,ma.y-A*K);c.lineTo(ma.x-2*jb+
-u*K,ma.y-2*bb+A*K);c.moveTo(ma.x-jb-bb+A*K,ma.y-bb+jb-u*K);c.lineTo(ma.x+bb-jb-A*K,ma.y-bb-jb+u*K);c.stroke()}});mxMarker.addMarker("halfCircle",function(c,l,v,n,u,A,B,ca,K,wa){var ma=u*(B+K+1),Xa=A*(B+K+1),jb=n.clone();n.x-=ma;n.y-=Xa;return function(){c.begin();c.moveTo(jb.x-Xa,jb.y+ma);c.quadTo(n.x-Xa,n.y+ma,n.x,n.y);c.quadTo(n.x+Xa,n.y-ma,jb.x+Xa,jb.y-ma);c.stroke()}});mxMarker.addMarker("async",function(c,l,v,n,u,A,B,ca,K,wa){l=u*K*1.118;v=A*K*1.118;u*=B+K;A*=B+K;var ma=n.clone();ma.x-=l;ma.y-=
-v;n.x+=-u-l;n.y+=-A-v;return function(){c.begin();c.moveTo(ma.x,ma.y);ca?c.lineTo(ma.x-u-A/2,ma.y-A+u/2):c.lineTo(ma.x+A/2-u,ma.y-A-u/2);c.lineTo(ma.x-u,ma.y-A);c.close();wa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(l,v,n,u,A,B,ca,K,wa,ma){A*=ca+wa;B*=ca+wa;var Xa=u.clone();return function(){l.begin();l.moveTo(Xa.x,Xa.y);K?l.lineTo(Xa.x-A-B/c,Xa.y-B+A/c):l.lineTo(Xa.x+B/c-A,Xa.y-B-A/c);l.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var ib=
-function(c,l,v){return gb(c,["width"],l,function(n,u,A,B,ca){ca=c.shape.getEdgeWidth()*c.view.scale+v;return new mxPoint(B.x+u*n/4+A*ca/2,B.y+A*n/4-u*ca/2)},function(n,u,A,B,ca,K){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ca.x,ca.y,K.x,K.y));c.style.width=Math.round(2*n)/c.view.scale-v})},gb=function(c,l,v,n,u){return hb(c,l,function(A){var B=c.absolutePoints,ca=B.length-1;A=c.view.translate;var K=c.view.scale,wa=v?B[0]:B[ca];B=v?B[1]:B[ca-1];ca=B.x-wa.x;var ma=B.y-wa.y,Xa=Math.sqrt(ca*ca+ma*ma);wa=
-n.call(this,Xa,ca/Xa,ma/Xa,wa,B);return new mxPoint(wa.x/K-A.x,wa.y/K-A.y)},function(A,B,ca){var K=c.absolutePoints,wa=K.length-1;A=c.view.translate;var ma=c.view.scale,Xa=v?K[0]:K[wa];K=v?K[1]:K[wa-1];wa=K.x-Xa.x;var jb=K.y-Xa.y,bb=Math.sqrt(wa*wa+jb*jb);B.x=(B.x+A.x)*ma;B.y=(B.y+A.y)*ma;u.call(this,bb,wa/bb,jb/bb,Xa,K,B,ca)})},qb=function(c,l){return function(v){return[gb(v,["startWidth"],!0,function(n,u,A,B,ca){ca=mxUtils.getNumber(v.style,"startWidth",c)*v.view.scale+l;return new mxPoint(B.x+
-u*n/4+A*ca/2,B.y+A*n/4-u*ca/2)},function(n,u,A,B,ca,K){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ca.x,ca.y,K.x,K.y));v.style.startWidth=Math.round(2*n)/v.view.scale-l})]}},nb=function(c){return function(l){return[hb(l,["arrowWidth","arrowSize"],function(v){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",Na.prototype.arrowWidth))),u=Math.max(0,Math.min(c,mxUtils.getValue(this.state.style,"arrowSize",Na.prototype.arrowSize)));return new mxPoint(v.x+(1-u)*v.width,v.y+(1-n)*v.height/
-2)},function(v,n){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(v.y+v.height/2-n.y)/v.height*2));this.state.style.arrowSize=Math.max(0,Math.min(c,(v.x+v.width-n.x)/v.width))})]}},mb=function(c){return function(l){return[hb(l,["size"],function(v){var n=Math.max(0,Math.min(.5*v.height,parseFloat(mxUtils.getValue(this.state.style,"size",c))));return new mxPoint(v.x,v.y+n)},function(v,n){this.state.style.size=Math.max(0,n.y-v.y)},!0)]}},Bb=function(c,l,v){return function(n){var u=[hb(n,["size"],
-function(A){var B=Math.max(0,Math.min(A.width,Math.min(A.height,parseFloat(mxUtils.getValue(this.state.style,"size",l)))))*c;return new mxPoint(A.x+B,A.y+B)},function(A,B){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(A.width,B.x-A.x),Math.min(A.height,B.y-A.y)))/c)},!1)];v&&mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&u.push(kb(n));return u}},wb=function(c,l,v,n,u){v=null!=v?v:.5;return function(A){var B=[hb(A,["size"],function(ca){var K=null!=u?"0"!=mxUtils.getValue(this.state.style,
-"fixedSize","0"):null,wa=parseFloat(mxUtils.getValue(this.state.style,"size",K?u:c));return new mxPoint(ca.x+Math.max(0,Math.min(.5*ca.width,wa*(K?1:ca.width))),ca.getCenterY())},function(ca,K,wa){ca=null!=u&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?K.x-ca.x:Math.max(0,Math.min(v,(K.x-ca.x)/ca.width));this.state.style.size=ca},!1,n)];l&&mxUtils.getValue(A.style,mxConstants.STYLE_ROUNDED,!1)&&B.push(kb(A));return B}},rb=function(c,l,v){c=null!=c?c:.5;return function(n){var u=[hb(n,["size"],
-function(A){var B=null!=v?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ca=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",B?v:l)));return new mxPoint(A.x+Math.min(.75*A.width*c,ca*(B?.75:.75*A.width)),A.y+A.height/4)},function(A,B){A=null!=v&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?B.x-A.x:Math.max(0,Math.min(c,(B.x-A.x)/A.width*.75));this.state.style.size=A},!1,!0)];mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&u.push(kb(n));return u}},vb=
-function(){return function(c){var l=[];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l}},kb=function(c,l){return hb(c,[mxConstants.STYLE_ARCSIZE],function(v){var n=null!=l?l:v.height/8;if("1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var u=mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(v.x+v.width-Math.min(v.width/2,u),v.y+n)}u=Math.max(0,parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,
-100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(v.x+v.width-Math.min(Math.max(v.width/2,v.height/2),Math.min(v.width,v.height)*u),v.y+n)},function(v,n,u){"1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(v.width,2*(v.x+v.width-n.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(v.width-n.x+v.x)/Math.min(v.width,v.height))))})},hb=function(c,l,v,n,
-u,A,B){var ca=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);ca.execute=function(wa){for(var ma=0;ma<l.length;ma++)this.copyStyle(l[ma]);B&&B(wa)};ca.getPosition=v;ca.setPosition=n;ca.ignoreGrid=null!=u?u:!0;if(A){var K=ca.positionChanged;ca.positionChanged=function(){K.apply(this,arguments);c.view.invalidate(this.state.cell);c.view.validate()}}return ca},tb={link:function(c){return[ib(c,!0,10),ib(c,!1,10)]},flexArrow:function(c){var l=c.view.graph.gridSize/c.view.scale,v=[];
-mxUtils.getValue(c.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(v.push(gb(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(n,u,A,B,ca){n=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;ca=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+u*(ca+c.shape.strokewidth*c.view.scale)+A*n/2,B.y+A*(ca+c.shape.strokewidth*c.view.scale)-u*n/2)},function(n,u,A,B,ca,K,wa){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,
-B.y,ca.x,ca.y,K.x,K.y));u=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-u,K.x,K.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(u-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*n)/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(wa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<
-l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE])})),v.push(gb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(n,u,A,B,ca){n=(c.shape.getStartArrowWidth()-c.shape.strokewidth)*c.view.scale;ca=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+u*(ca+c.shape.strokewidth*c.view.scale)+A*n/2,B.y+A*(ca+c.shape.strokewidth*c.view.scale)-u*n/2)},function(n,u,A,B,ca,
-K,wa){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ca.x,ca.y,K.x,K.y));u=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-u,K.x,K.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(u-c.shape.strokewidth)/3)/100/c.view.scale;c.style.startWidth=Math.max(0,Math.round(2*n)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE],c.style.endWidth=c.style.startWidth;mxEvent.isAltDown(wa.getEvent())||
-(Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(c.style.startWidth)-parseFloat(c.style.endWidth))<l&&(c.style.startWidth=c.style.endWidth))})));mxUtils.getValue(c.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(v.push(gb(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(n,u,A,B,ca){n=(c.shape.getEdgeWidth()-
-c.shape.strokewidth)*c.view.scale;ca=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+u*(ca+c.shape.strokewidth*c.view.scale)-A*n/2,B.y+A*(ca+c.shape.strokewidth*c.view.scale)+u*n/2)},function(n,u,A,B,ca,K,wa){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ca.x,ca.y,K.x,K.y));u=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-u,K.x,K.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(u-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*
-n)/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(wa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE])})),v.push(gb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(n,u,A,B,ca){n=
-(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;ca=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+u*(ca+c.shape.strokewidth*c.view.scale)-A*n/2,B.y+A*(ca+c.shape.strokewidth*c.view.scale)+u*n/2)},function(n,u,A,B,ca,K,wa){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ca.x,ca.y,K.x,K.y));u=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-u,K.x,K.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(u-c.shape.strokewidth)/3)/100/c.view.scale;
-c.style.endWidth=Math.max(0,Math.round(2*n)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE],c.style.startWidth=c.style.endWidth;mxEvent.isAltDown(wa.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(c.style.endWidth)-
-parseFloat(c.style.startWidth))<l&&(c.style.endWidth=c.style.startWidth))})));return v},swimlane:function(c){var l=[];if(mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED)){var v=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));l.push(kb(c,v/2))}l.push(hb(c,[mxConstants.STYLE_STARTSIZE],function(n){var u=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(c.style,mxConstants.STYLE_HORIZONTAL,
+Jb=Math.max(0,Math.min(50,K));A=Qa.prototype;c.setDashed(Wa);jb&&""!=jb&&c.setDashPattern(jb);c.setStrokeWidth(Gb);K=Math.min(.5*u,.5*n,K);ha||(K=Jb*Math.min(n,u)/100);K=Math.min(K,.5*Math.min(n,u));ha||(ma=Math.min(bb*Math.min(n,u)/100));ma=Math.min(ma,.5*Math.min(n,u)-K);(Ga||Ka||Ia||Ha)&&"frame"!=wa&&(c.begin(),Ga?A.moveNW(c,m,v,n,u,C,Sa,K,Ha):c.moveTo(0,0),Ga&&A.paintNW(c,m,v,n,u,C,Sa,K,Ha),A.paintTop(c,m,v,n,u,C,Ta,K,Ka),Ka&&A.paintNE(c,m,v,n,u,C,Ta,K,Ga),A.paintRight(c,m,v,n,u,C,Ua,K,Ia),Ia&&
+A.paintSE(c,m,v,n,u,C,Ua,K,Ka),A.paintBottom(c,m,v,n,u,C,Va,K,Ha),Ha&&A.paintSW(c,m,v,n,u,C,Va,K,Ia),A.paintLeft(c,m,v,n,u,C,Sa,K,Ga),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(Db),Wa=ha=Ib,"none"==Db&&(ha=0),"none"==Eb&&(Wa=0),c.setGradient(Db,Eb,0,0,n,u,Hb,ha,Wa),c.begin(),Ga?A.moveNWInner(c,m,v,n,u,C,Sa,K,ma,Ga,Ha):c.moveTo(ma,0),A.paintLeftInner(c,m,v,n,u,C,Va,K,ma,Ia,Ha),Ha&&Ia&&A.paintSWInner(c,m,v,n,u,C,Va,K,ma,Ia),A.paintBottomInner(c,m,v,n,u,C,Ua,K,ma,Ka,Ia),Ia&&Ka&&A.paintSEInner(c,
+m,v,n,u,C,Ua,K,ma),A.paintRightInner(c,m,v,n,u,C,Ta,K,ma,Ga,Ka),Ka&&Ga&&A.paintNEInner(c,m,v,n,u,C,Ta,K,ma),A.paintTopInner(c,m,v,n,u,C,Sa,K,ma,Ha,Ga),Ga&&Ha&&A.paintNWInner(c,m,v,n,u,C,Sa,K,ma),c.fill(),"none"==Fb&&(c.begin(),A.paintFolds(c,m,v,n,u,C,Sa,Ta,Ua,Va,K,Ga,Ka,Ia,Ha),c.stroke()));Ga||Ka||Ia||!Ha?Ga||Ka||!Ia||Ha?!Ga&&!Ka&&Ia&&Ha?"frame"!=wa?(c.begin(),A.moveSE(c,m,v,n,u,C,Ua,K,Ka),A.paintBottom(c,m,v,n,u,C,Va,K,Ha),A.paintSW(c,m,v,n,u,C,Va,K,Ia),A.paintLeft(c,m,v,n,u,C,Sa,K,Ga),"double"==
+wa&&(A.moveNWInner(c,m,v,n,u,C,Sa,K,ma,Ga,Ha),A.paintLeftInner(c,m,v,n,u,C,Va,K,ma,Ia,Ha),A.paintSWInner(c,m,v,n,u,C,Va,K,ma,Ia),A.paintBottomInner(c,m,v,n,u,C,Ua,K,ma,Ka,Ia)),c.stroke()):(c.begin(),A.moveSE(c,m,v,n,u,C,Ua,K,Ka),A.paintBottom(c,m,v,n,u,C,Va,K,Ha),A.paintSW(c,m,v,n,u,C,Va,K,Ia),A.paintLeft(c,m,v,n,u,C,Sa,K,Ga),A.lineNWInner(c,m,v,n,u,C,Sa,K,ma,Ga,Ha),A.paintLeftInner(c,m,v,n,u,C,Va,K,ma,Ia,Ha),A.paintSWInner(c,m,v,n,u,C,Va,K,ma,Ia),A.paintBottomInner(c,m,v,n,u,C,Ua,K,ma,Ka,Ia),c.close(),
+c.fillAndStroke()):Ga||!Ka||Ia||Ha?!Ga&&Ka&&!Ia&&Ha?"frame"!=wa?(c.begin(),A.moveSW(c,m,v,n,u,C,Sa,K,Ia),A.paintLeft(c,m,v,n,u,C,Sa,K,Ga),"double"==wa&&(A.moveNWInner(c,m,v,n,u,C,Sa,K,ma,Ga,Ha),A.paintLeftInner(c,m,v,n,u,C,Va,K,ma,Ia,Ha)),c.stroke(),c.begin(),A.moveNE(c,m,v,n,u,C,Ta,K,Ga),A.paintRight(c,m,v,n,u,C,Ua,K,Ia),"double"==wa&&(A.moveSEInner(c,m,v,n,u,C,Ua,K,ma,Ia),A.paintRightInner(c,m,v,n,u,C,Ta,K,ma,Ga,Ka)),c.stroke()):(c.begin(),A.moveSW(c,m,v,n,u,C,Sa,K,Ia),A.paintLeft(c,m,v,n,u,C,Sa,
+K,Ga),A.lineNWInner(c,m,v,n,u,C,Sa,K,ma,Ga,Ha),A.paintLeftInner(c,m,v,n,u,C,Va,K,ma,Ia,Ha),c.close(),c.fillAndStroke(),c.begin(),A.moveNE(c,m,v,n,u,C,Ta,K,Ga),A.paintRight(c,m,v,n,u,C,Ua,K,Ia),A.lineSEInner(c,m,v,n,u,C,Ua,K,ma,Ia),A.paintRightInner(c,m,v,n,u,C,Ta,K,ma,Ga,Ka),c.close(),c.fillAndStroke()):!Ga&&Ka&&Ia&&!Ha?"frame"!=wa?(c.begin(),A.moveNE(c,m,v,n,u,C,Ta,K,Ga),A.paintRight(c,m,v,n,u,C,Ua,K,Ia),A.paintSE(c,m,v,n,u,C,Ua,K,Ka),A.paintBottom(c,m,v,n,u,C,Va,K,Ha),"double"==wa&&(A.moveSWInner(c,
+m,v,n,u,C,Va,K,ma,Ha),A.paintBottomInner(c,m,v,n,u,C,Ua,K,ma,Ka,Ia),A.paintSEInner(c,m,v,n,u,C,Ua,K,ma),A.paintRightInner(c,m,v,n,u,C,Ta,K,ma,Ga,Ka)),c.stroke()):(c.begin(),A.moveNE(c,m,v,n,u,C,Ta,K,Ga),A.paintRight(c,m,v,n,u,C,Ua,K,Ia),A.paintSE(c,m,v,n,u,C,Ua,K,Ka),A.paintBottom(c,m,v,n,u,C,Va,K,Ha),A.lineSWInner(c,m,v,n,u,C,Va,K,ma,Ha),A.paintBottomInner(c,m,v,n,u,C,Ua,K,ma,Ka,Ia),A.paintSEInner(c,m,v,n,u,C,Ua,K,ma),A.paintRightInner(c,m,v,n,u,C,Ta,K,ma,Ga,Ka),c.close(),c.fillAndStroke()):!Ga&&
+Ka&&Ia&&Ha?"frame"!=wa?(c.begin(),A.moveNE(c,m,v,n,u,C,Ta,K,Ga),A.paintRight(c,m,v,n,u,C,Ua,K,Ia),A.paintSE(c,m,v,n,u,C,Ua,K,Ka),A.paintBottom(c,m,v,n,u,C,Va,K,Ha),A.paintSW(c,m,v,n,u,C,Va,K,Ia),A.paintLeft(c,m,v,n,u,C,Sa,K,Ga),"double"==wa&&(A.moveNWInner(c,m,v,n,u,C,Sa,K,ma,Ga,Ha),A.paintLeftInner(c,m,v,n,u,C,Va,K,ma,Ia,Ha),A.paintSWInner(c,m,v,n,u,C,Va,K,ma,Ia),A.paintBottomInner(c,m,v,n,u,C,Ua,K,ma,Ka,Ia),A.paintSEInner(c,m,v,n,u,C,Ua,K,ma),A.paintRightInner(c,m,v,n,u,C,Ta,K,ma,Ga,Ka)),c.stroke()):
+(c.begin(),A.moveNE(c,m,v,n,u,C,Ta,K,Ga),A.paintRight(c,m,v,n,u,C,Ua,K,Ia),A.paintSE(c,m,v,n,u,C,Ua,K,Ka),A.paintBottom(c,m,v,n,u,C,Va,K,Ha),A.paintSW(c,m,v,n,u,C,Va,K,Ia),A.paintLeft(c,m,v,n,u,C,Sa,K,Ga),A.lineNWInner(c,m,v,n,u,C,Sa,K,ma,Ga,Ha),A.paintLeftInner(c,m,v,n,u,C,Va,K,ma,Ia,Ha),A.paintSWInner(c,m,v,n,u,C,Va,K,ma,Ia),A.paintBottomInner(c,m,v,n,u,C,Ua,K,ma,Ka,Ia),A.paintSEInner(c,m,v,n,u,C,Ua,K,ma),A.paintRightInner(c,m,v,n,u,C,Ta,K,ma,Ga,Ka),c.close(),c.fillAndStroke()):!Ga||Ka||Ia||Ha?
+Ga&&!Ka&&!Ia&&Ha?"frame"!=wa?(c.begin(),A.moveSW(c,m,v,n,u,C,Va,K,Ia),A.paintLeft(c,m,v,n,u,C,Sa,K,Ga),A.paintNW(c,m,v,n,u,C,Sa,K,Ha),A.paintTop(c,m,v,n,u,C,Ta,K,Ka),"double"==wa&&(A.moveNEInner(c,m,v,n,u,C,Ta,K,ma,Ka),A.paintTopInner(c,m,v,n,u,C,Sa,K,ma,Ha,Ga),A.paintNWInner(c,m,v,n,u,C,Sa,K,ma),A.paintLeftInner(c,m,v,n,u,C,Va,K,ma,Ia,Ha)),c.stroke()):(c.begin(),A.moveSW(c,m,v,n,u,C,Va,K,Ia),A.paintLeft(c,m,v,n,u,C,Sa,K,Ga),A.paintNW(c,m,v,n,u,C,Sa,K,Ha),A.paintTop(c,m,v,n,u,C,Ta,K,Ka),A.lineNEInner(c,
+m,v,n,u,C,Ta,K,ma,Ka),A.paintTopInner(c,m,v,n,u,C,Sa,K,ma,Ha,Ga),A.paintNWInner(c,m,v,n,u,C,Sa,K,ma),A.paintLeftInner(c,m,v,n,u,C,Va,K,ma,Ia,Ha),c.close(),c.fillAndStroke()):Ga&&!Ka&&Ia&&!Ha?"frame"!=wa?(c.begin(),A.moveNW(c,m,v,n,u,C,Sa,K,Ha),A.paintTop(c,m,v,n,u,C,Ta,K,Ka),"double"==wa&&(A.moveNEInner(c,m,v,n,u,C,Ta,K,ma,Ka),A.paintTopInner(c,m,v,n,u,C,Sa,K,ma,Ha,Ga)),c.stroke(),c.begin(),A.moveSE(c,m,v,n,u,C,Ua,K,Ka),A.paintBottom(c,m,v,n,u,C,Va,K,Ha),"double"==wa&&(A.moveSWInner(c,m,v,n,u,C,Va,
+K,ma,Ha),A.paintBottomInner(c,m,v,n,u,C,Ua,K,ma,Ka,Ia)),c.stroke()):(c.begin(),A.moveNW(c,m,v,n,u,C,Sa,K,Ha),A.paintTop(c,m,v,n,u,C,Ta,K,Ka),A.lineNEInner(c,m,v,n,u,C,Ta,K,ma,Ka),A.paintTopInner(c,m,v,n,u,C,Sa,K,ma,Ha,Ga),c.close(),c.fillAndStroke(),c.begin(),A.moveSE(c,m,v,n,u,C,Ua,K,Ka),A.paintBottom(c,m,v,n,u,C,Va,K,Ha),A.lineSWInner(c,m,v,n,u,C,Va,K,ma,Ha),A.paintBottomInner(c,m,v,n,u,C,Ua,K,ma,Ka,Ia),c.close(),c.fillAndStroke()):Ga&&!Ka&&Ia&&Ha?"frame"!=wa?(c.begin(),A.moveSE(c,m,v,n,u,C,Ua,
+K,Ka),A.paintBottom(c,m,v,n,u,C,Va,K,Ha),A.paintSW(c,m,v,n,u,C,Va,K,Ia),A.paintLeft(c,m,v,n,u,C,Sa,K,Ga),A.paintNW(c,m,v,n,u,C,Sa,K,Ha),A.paintTop(c,m,v,n,u,C,Ta,K,Ka),"double"==wa&&(A.moveNEInner(c,m,v,n,u,C,Ta,K,ma,Ka),A.paintTopInner(c,m,v,n,u,C,Sa,K,ma,Ha,Ga),A.paintNWInner(c,m,v,n,u,C,Sa,K,ma),A.paintLeftInner(c,m,v,n,u,C,Va,K,ma,Ia,Ha),A.paintSWInner(c,m,v,n,u,C,Va,K,ma,Ia),A.paintBottomInner(c,m,v,n,u,C,Ua,K,ma,Ka,Ia)),c.stroke()):(c.begin(),A.moveSE(c,m,v,n,u,C,Ua,K,Ka),A.paintBottom(c,m,
+v,n,u,C,Va,K,Ha),A.paintSW(c,m,v,n,u,C,Va,K,Ia),A.paintLeft(c,m,v,n,u,C,Sa,K,Ga),A.paintNW(c,m,v,n,u,C,Sa,K,Ha),A.paintTop(c,m,v,n,u,C,Ta,K,Ka),A.lineNEInner(c,m,v,n,u,C,Ta,K,ma,Ka),A.paintTopInner(c,m,v,n,u,C,Sa,K,ma,Ha,Ga),A.paintNWInner(c,m,v,n,u,C,Sa,K,ma),A.paintLeftInner(c,m,v,n,u,C,Va,K,ma,Ia,Ha),A.paintSWInner(c,m,v,n,u,C,Va,K,ma,Ia),A.paintBottomInner(c,m,v,n,u,C,Ua,K,ma,Ka,Ia),c.close(),c.fillAndStroke()):Ga&&Ka&&!Ia&&!Ha?"frame"!=wa?(c.begin(),A.moveNW(c,m,v,n,u,C,Sa,K,Ha),A.paintTop(c,
+m,v,n,u,C,Ta,K,Ka),A.paintNE(c,m,v,n,u,C,Ta,K,Ga),A.paintRight(c,m,v,n,u,C,Ua,K,Ia),"double"==wa&&(A.moveSEInner(c,m,v,n,u,C,Ua,K,ma,Ia),A.paintRightInner(c,m,v,n,u,C,Ta,K,ma,Ga,Ka),A.paintNEInner(c,m,v,n,u,C,Ta,K,ma),A.paintTopInner(c,m,v,n,u,C,Sa,K,ma,Ha,Ga)),c.stroke()):(c.begin(),A.moveNW(c,m,v,n,u,C,Sa,K,Ha),A.paintTop(c,m,v,n,u,C,Ta,K,Ka),A.paintNE(c,m,v,n,u,C,Ta,K,Ga),A.paintRight(c,m,v,n,u,C,Ua,K,Ia),A.lineSEInner(c,m,v,n,u,C,Ua,K,ma,Ia),A.paintRightInner(c,m,v,n,u,C,Ta,K,ma,Ga,Ka),A.paintNEInner(c,
+m,v,n,u,C,Ta,K,ma),A.paintTopInner(c,m,v,n,u,C,Sa,K,ma,Ha,Ga),c.close(),c.fillAndStroke()):Ga&&Ka&&!Ia&&Ha?"frame"!=wa?(c.begin(),A.moveSW(c,m,v,n,u,C,Va,K,Ia),A.paintLeft(c,m,v,n,u,C,Sa,K,Ga),A.paintNW(c,m,v,n,u,C,Sa,K,Ha),A.paintTop(c,m,v,n,u,C,Ta,K,Ka),A.paintNE(c,m,v,n,u,C,Ta,K,Ga),A.paintRight(c,m,v,n,u,C,Ua,K,Ia),"double"==wa&&(A.moveSEInner(c,m,v,n,u,C,Ua,K,ma,Ia),A.paintRightInner(c,m,v,n,u,C,Ta,K,ma,Ga,Ka),A.paintNEInner(c,m,v,n,u,C,Ta,K,ma),A.paintTopInner(c,m,v,n,u,C,Sa,K,ma,Ha,Ga),A.paintNWInner(c,
+m,v,n,u,C,Sa,K,ma),A.paintLeftInner(c,m,v,n,u,C,Va,K,ma,Ia,Ha)),c.stroke()):(c.begin(),A.moveSW(c,m,v,n,u,C,Va,K,Ia),A.paintLeft(c,m,v,n,u,C,Sa,K,Ga),A.paintNW(c,m,v,n,u,C,Sa,K,Ha),A.paintTop(c,m,v,n,u,C,Ta,K,Ka),A.paintNE(c,m,v,n,u,C,Ta,K,Ga),A.paintRight(c,m,v,n,u,C,Ua,K,Ia),A.lineSEInner(c,m,v,n,u,C,Ua,K,ma,Ia),A.paintRightInner(c,m,v,n,u,C,Ta,K,ma,Ga,Ka),A.paintNEInner(c,m,v,n,u,C,Ta,K,ma),A.paintTopInner(c,m,v,n,u,C,Sa,K,ma,Ha,Ga),A.paintNWInner(c,m,v,n,u,C,Sa,K,ma),A.paintLeftInner(c,m,v,n,
+u,C,Va,K,ma,Ia,Ha),c.close(),c.fillAndStroke()):Ga&&Ka&&Ia&&!Ha?"frame"!=wa?(c.begin(),A.moveNW(c,m,v,n,u,C,Sa,K,Ha),A.paintTop(c,m,v,n,u,C,Ta,K,Ka),A.paintNE(c,m,v,n,u,C,Ta,K,Ga),A.paintRight(c,m,v,n,u,C,Ua,K,Ia),A.paintSE(c,m,v,n,u,C,Ua,K,Ka),A.paintBottom(c,m,v,n,u,C,Va,K,Ha),"double"==wa&&(A.moveSWInner(c,m,v,n,u,C,Va,K,ma,Ha),A.paintBottomInner(c,m,v,n,u,C,Ua,K,ma,Ka,Ia),A.paintSEInner(c,m,v,n,u,C,Ua,K,ma),A.paintRightInner(c,m,v,n,u,C,Ta,K,ma,Ga,Ka),A.paintNEInner(c,m,v,n,u,C,Ta,K,ma),A.paintTopInner(c,
+m,v,n,u,C,Sa,K,ma,Ha,Ga)),c.stroke()):(c.begin(),A.moveNW(c,m,v,n,u,C,Sa,K,Ha),A.paintTop(c,m,v,n,u,C,Ta,K,Ka),A.paintNE(c,m,v,n,u,C,Ta,K,Ga),A.paintRight(c,m,v,n,u,C,Ua,K,Ia),A.paintSE(c,m,v,n,u,C,Ua,K,Ka),A.paintBottom(c,m,v,n,u,C,Va,K,Ha),A.lineSWInner(c,m,v,n,u,C,Va,K,ma,Ha),A.paintBottomInner(c,m,v,n,u,C,Ua,K,ma,Ka,Ia),A.paintSEInner(c,m,v,n,u,C,Ua,K,ma),A.paintRightInner(c,m,v,n,u,C,Ta,K,ma,Ga,Ka),A.paintNEInner(c,m,v,n,u,C,Ta,K,ma),A.paintTopInner(c,m,v,n,u,C,Sa,K,ma,Ha,Ga),c.close(),c.fillAndStroke()):
+Ga&&Ka&&Ia&&Ha&&("frame"!=wa?(c.begin(),A.moveNW(c,m,v,n,u,C,Sa,K,Ha),A.paintNW(c,m,v,n,u,C,Sa,K,Ha),A.paintTop(c,m,v,n,u,C,Ta,K,Ka),A.paintNE(c,m,v,n,u,C,Ta,K,Ga),A.paintRight(c,m,v,n,u,C,Ua,K,Ia),A.paintSE(c,m,v,n,u,C,Ua,K,Ka),A.paintBottom(c,m,v,n,u,C,Va,K,Ha),A.paintSW(c,m,v,n,u,C,Va,K,Ia),A.paintLeft(c,m,v,n,u,C,Sa,K,Ga),c.close(),"double"==wa&&(A.moveSWInner(c,m,v,n,u,C,Va,K,ma,Ha),A.paintSWInner(c,m,v,n,u,C,Va,K,ma,Ia),A.paintBottomInner(c,m,v,n,u,C,Ua,K,ma,Ka,Ia),A.paintSEInner(c,m,v,n,u,
+C,Ua,K,ma),A.paintRightInner(c,m,v,n,u,C,Ta,K,ma,Ga,Ka),A.paintNEInner(c,m,v,n,u,C,Ta,K,ma),A.paintTopInner(c,m,v,n,u,C,Sa,K,ma,Ha,Ga),A.paintNWInner(c,m,v,n,u,C,Sa,K,ma),A.paintLeftInner(c,m,v,n,u,C,Va,K,ma,Ia,Ha),c.close()),c.stroke()):(c.begin(),A.moveNW(c,m,v,n,u,C,Sa,K,Ha),A.paintNW(c,m,v,n,u,C,Sa,K,Ha),A.paintTop(c,m,v,n,u,C,Ta,K,Ka),A.paintNE(c,m,v,n,u,C,Ta,K,Ga),A.paintRight(c,m,v,n,u,C,Ua,K,Ia),A.paintSE(c,m,v,n,u,C,Ua,K,Ka),A.paintBottom(c,m,v,n,u,C,Va,K,Ha),A.paintSW(c,m,v,n,u,C,Va,K,Ia),
+A.paintLeft(c,m,v,n,u,C,Sa,K,Ga),c.close(),A.moveSWInner(c,m,v,n,u,C,Va,K,ma,Ha),A.paintSWInner(c,m,v,n,u,C,Va,K,ma,Ia),A.paintBottomInner(c,m,v,n,u,C,Ua,K,ma,Ka,Ia),A.paintSEInner(c,m,v,n,u,C,Ua,K,ma),A.paintRightInner(c,m,v,n,u,C,Ta,K,ma,Ga,Ka),A.paintNEInner(c,m,v,n,u,C,Ta,K,ma),A.paintTopInner(c,m,v,n,u,C,Sa,K,ma,Ha,Ga),A.paintNWInner(c,m,v,n,u,C,Sa,K,ma),A.paintLeftInner(c,m,v,n,u,C,Va,K,ma,Ia,Ha),c.close(),c.fillAndStroke())):"frame"!=wa?(c.begin(),A.moveNW(c,m,v,n,u,C,Sa,K,Ha),A.paintTop(c,
+m,v,n,u,C,Ta,K,Ka),"double"==wa&&(A.moveNEInner(c,m,v,n,u,C,Ta,K,ma,Ka),A.paintTopInner(c,m,v,n,u,C,Sa,K,ma,Ha,Ga)),c.stroke()):(c.begin(),A.moveNW(c,m,v,n,u,C,Sa,K,Ha),A.paintTop(c,m,v,n,u,C,Ta,K,Ka),A.lineNEInner(c,m,v,n,u,C,Ta,K,ma,Ka),A.paintTopInner(c,m,v,n,u,C,Sa,K,ma,Ha,Ga),c.close(),c.fillAndStroke()):"frame"!=wa?(c.begin(),A.moveNE(c,m,v,n,u,C,Ta,K,Ga),A.paintRight(c,m,v,n,u,C,Ua,K,Ia),"double"==wa&&(A.moveSEInner(c,m,v,n,u,C,Ua,K,ma,Ia),A.paintRightInner(c,m,v,n,u,C,Ta,K,ma,Ga,Ka)),c.stroke()):
+(c.begin(),A.moveNE(c,m,v,n,u,C,Ta,K,Ga),A.paintRight(c,m,v,n,u,C,Ua,K,Ia),A.lineSEInner(c,m,v,n,u,C,Ua,K,ma,Ia),A.paintRightInner(c,m,v,n,u,C,Ta,K,ma,Ga,Ka),c.close(),c.fillAndStroke()):"frame"!=wa?(c.begin(),A.moveSE(c,m,v,n,u,C,Ua,K,Ka),A.paintBottom(c,m,v,n,u,C,Va,K,Ha),"double"==wa&&(A.moveSWInner(c,m,v,n,u,C,Va,K,ma,Ha),A.paintBottomInner(c,m,v,n,u,C,Ua,K,ma,Ka,Ia)),c.stroke()):(c.begin(),A.moveSE(c,m,v,n,u,C,Ua,K,Ka),A.paintBottom(c,m,v,n,u,C,Va,K,Ha),A.lineSWInner(c,m,v,n,u,C,Va,K,ma,Ha),
+A.paintBottomInner(c,m,v,n,u,C,Ua,K,ma,Ka,Ia),c.close(),c.fillAndStroke()):"frame"!=wa?(c.begin(),A.moveSW(c,m,v,n,u,C,Sa,K,Ia),A.paintLeft(c,m,v,n,u,C,Sa,K,Ga),"double"==wa&&(A.moveNWInner(c,m,v,n,u,C,Sa,K,ma,Ga,Ha),A.paintLeftInner(c,m,v,n,u,C,Va,K,ma,Ia,Ha)),c.stroke()):(c.begin(),A.moveSW(c,m,v,n,u,C,Sa,K,Ia),A.paintLeft(c,m,v,n,u,C,Sa,K,Ga),A.lineNWInner(c,m,v,n,u,C,Sa,K,ma,Ga,Ha),A.paintLeftInner(c,m,v,n,u,C,Va,K,ma,Ia,Ha),c.close(),c.fillAndStroke());c.begin();A.paintFolds(c,m,v,n,u,C,Sa,Ta,
+Ua,Va,K,Ga,Ka,Ia,Ha);c.stroke()};Qa.prototype.moveNW=function(c,m,v,n,u,A,C,ha,K){"square"==C||"default"==C&&"square"==A||!K?c.moveTo(0,0):c.moveTo(0,ha)};Qa.prototype.moveNE=function(c,m,v,n,u,A,C,ha,K){"square"==C||"default"==C&&"square"==A||!K?c.moveTo(n,0):c.moveTo(n-ha,0)};Qa.prototype.moveSE=function(c,m,v,n,u,A,C,ha,K){"square"==C||"default"==C&&"square"==A||!K?c.moveTo(n,u):c.moveTo(n,u-ha)};Qa.prototype.moveSW=function(c,m,v,n,u,A,C,ha,K){"square"==C||"default"==C&&"square"==A||!K?c.moveTo(0,
+u):c.moveTo(ha,u)};Qa.prototype.paintNW=function(c,m,v,n,u,A,C,ha,K){if(K)if("rounded"==C||"default"==C&&"rounded"==A||"invRound"==C||"default"==C&&"invRound"==A){m=0;if("rounded"==C||"default"==C&&"rounded"==A)m=1;c.arcTo(ha,ha,0,0,m,ha,0)}else("snip"==C||"default"==C&&"snip"==A||"fold"==C||"default"==C&&"fold"==A)&&c.lineTo(ha,0);else c.lineTo(0,0)};Qa.prototype.paintTop=function(c,m,v,n,u,A,C,ha,K){"square"==C||"default"==C&&"square"==A||!K?c.lineTo(n,0):c.lineTo(n-ha,0)};Qa.prototype.paintNE=
+function(c,m,v,n,u,A,C,ha,K){if(K)if("rounded"==C||"default"==C&&"rounded"==A||"invRound"==C||"default"==C&&"invRound"==A){m=0;if("rounded"==C||"default"==C&&"rounded"==A)m=1;c.arcTo(ha,ha,0,0,m,n,ha)}else("snip"==C||"default"==C&&"snip"==A||"fold"==C||"default"==C&&"fold"==A)&&c.lineTo(n,ha);else c.lineTo(n,0)};Qa.prototype.paintRight=function(c,m,v,n,u,A,C,ha,K){"square"==C||"default"==C&&"square"==A||!K?c.lineTo(n,u):c.lineTo(n,u-ha)};Qa.prototype.paintLeft=function(c,m,v,n,u,A,C,ha,K){"square"==
+C||"default"==C&&"square"==A||!K?c.lineTo(0,0):c.lineTo(0,ha)};Qa.prototype.paintSE=function(c,m,v,n,u,A,C,ha,K){if(K)if("rounded"==C||"default"==C&&"rounded"==A||"invRound"==C||"default"==C&&"invRound"==A){m=0;if("rounded"==C||"default"==C&&"rounded"==A)m=1;c.arcTo(ha,ha,0,0,m,n-ha,u)}else("snip"==C||"default"==C&&"snip"==A||"fold"==C||"default"==C&&"fold"==A)&&c.lineTo(n-ha,u);else c.lineTo(n,u)};Qa.prototype.paintBottom=function(c,m,v,n,u,A,C,ha,K){"square"==C||"default"==C&&"square"==A||!K?c.lineTo(0,
+u):c.lineTo(ha,u)};Qa.prototype.paintSW=function(c,m,v,n,u,A,C,ha,K){if(K)if("rounded"==C||"default"==C&&"rounded"==A||"invRound"==C||"default"==C&&"invRound"==A){m=0;if("rounded"==C||"default"==C&&"rounded"==A)m=1;c.arcTo(ha,ha,0,0,m,0,u-ha)}else("snip"==C||"default"==C&&"snip"==A||"fold"==C||"default"==C&&"fold"==A)&&c.lineTo(0,u-ha);else c.lineTo(0,u)};Qa.prototype.paintNWInner=function(c,m,v,n,u,A,C,ha,K){if("rounded"==C||"default"==C&&"rounded"==A)c.arcTo(ha-.5*K,ha-.5*K,0,0,0,K,.5*K+ha);else if("invRound"==
+C||"default"==C&&"invRound"==A)c.arcTo(ha+K,ha+K,0,0,1,K,K+ha);else if("snip"==C||"default"==C&&"snip"==A)c.lineTo(K,.5*K+ha);else if("fold"==C||"default"==C&&"fold"==A)c.lineTo(K+ha,K+ha),c.lineTo(K,K+ha)};Qa.prototype.paintTopInner=function(c,m,v,n,u,A,C,ha,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(0,K):wa&&!ma?c.lineTo(K,0):wa?"square"==C||"default"==C&&"square"==A?c.lineTo(K,K):"rounded"==C||"default"==C&&"rounded"==A||"snip"==C||"default"==C&&"snip"==A?c.lineTo(ha+.5*K,K):c.lineTo(ha+K,K):c.lineTo(0,
+K):c.lineTo(0,0)};Qa.prototype.paintNEInner=function(c,m,v,n,u,A,C,ha,K){if("rounded"==C||"default"==C&&"rounded"==A)c.arcTo(ha-.5*K,ha-.5*K,0,0,0,n-ha-.5*K,K);else if("invRound"==C||"default"==C&&"invRound"==A)c.arcTo(ha+K,ha+K,0,0,1,n-ha-K,K);else if("snip"==C||"default"==C&&"snip"==A)c.lineTo(n-ha-.5*K,K);else if("fold"==C||"default"==C&&"fold"==A)c.lineTo(n-ha-K,ha+K),c.lineTo(n-ha-K,K)};Qa.prototype.paintRightInner=function(c,m,v,n,u,A,C,ha,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(n-K,0):wa&&!ma?c.lineTo(n,
+K):wa?"square"==C||"default"==C&&"square"==A?c.lineTo(n-K,K):"rounded"==C||"default"==C&&"rounded"==A||"snip"==C||"default"==C&&"snip"==A?c.lineTo(n-K,ha+.5*K):c.lineTo(n-K,ha+K):c.lineTo(n-K,0):c.lineTo(n,0)};Qa.prototype.paintLeftInner=function(c,m,v,n,u,A,C,ha,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(K,u):wa&&!ma?c.lineTo(0,u-K):wa?"square"==C||"default"==C&&"square"==A?c.lineTo(K,u-K):"rounded"==C||"default"==C&&"rounded"==A||"snip"==C||"default"==C&&"snip"==A?c.lineTo(K,u-ha-.5*K):c.lineTo(K,u-ha-K):
+c.lineTo(K,u):c.lineTo(0,u)};Qa.prototype.paintSEInner=function(c,m,v,n,u,A,C,ha,K){if("rounded"==C||"default"==C&&"rounded"==A)c.arcTo(ha-.5*K,ha-.5*K,0,0,0,n-K,u-ha-.5*K);else if("invRound"==C||"default"==C&&"invRound"==A)c.arcTo(ha+K,ha+K,0,0,1,n-K,u-ha-K);else if("snip"==C||"default"==C&&"snip"==A)c.lineTo(n-K,u-ha-.5*K);else if("fold"==C||"default"==C&&"fold"==A)c.lineTo(n-ha-K,u-ha-K),c.lineTo(n-K,u-ha-K)};Qa.prototype.paintBottomInner=function(c,m,v,n,u,A,C,ha,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(n,
+u-K):wa&&!ma?c.lineTo(n-K,u):"square"==C||"default"==C&&"square"==A||!wa?c.lineTo(n-K,u-K):"rounded"==C||"default"==C&&"rounded"==A||"snip"==C||"default"==C&&"snip"==A?c.lineTo(n-ha-.5*K,u-K):c.lineTo(n-ha-K,u-K):c.lineTo(n,u)};Qa.prototype.paintSWInner=function(c,m,v,n,u,A,C,ha,K,wa){if(!wa)c.lineTo(K,u);else if("square"==C||"default"==C&&"square"==A)c.lineTo(K,u-K);else if("rounded"==C||"default"==C&&"rounded"==A)c.arcTo(ha-.5*K,ha-.5*K,0,0,0,ha+.5*K,u-K);else if("invRound"==C||"default"==C&&"invRound"==
+A)c.arcTo(ha+K,ha+K,0,0,1,ha+K,u-K);else if("snip"==C||"default"==C&&"snip"==A)c.lineTo(ha+.5*K,u-K);else if("fold"==C||"default"==C&&"fold"==A)c.lineTo(K+ha,u-ha-K),c.lineTo(K+ha,u-K)};Qa.prototype.moveSWInner=function(c,m,v,n,u,A,C,ha,K,wa){wa?"square"==C||"default"==C&&"square"==A?c.moveTo(K,u-K):"rounded"==C||"default"==C&&"rounded"==A||"snip"==C||"default"==C&&"snip"==A?c.moveTo(K,u-ha-.5*K):("invRound"==C||"default"==C&&"invRound"==A||"fold"==C||"default"==C&&"fold"==A)&&c.moveTo(K,u-ha-K):
+c.moveTo(0,u-K)};Qa.prototype.lineSWInner=function(c,m,v,n,u,A,C,ha,K,wa){wa?"square"==C||"default"==C&&"square"==A?c.lineTo(K,u-K):"rounded"==C||"default"==C&&"rounded"==A||"snip"==C||"default"==C&&"snip"==A?c.lineTo(K,u-ha-.5*K):("invRound"==C||"default"==C&&"invRound"==A||"fold"==C||"default"==C&&"fold"==A)&&c.lineTo(K,u-ha-K):c.lineTo(0,u-K)};Qa.prototype.moveSEInner=function(c,m,v,n,u,A,C,ha,K,wa){wa?"square"==C||"default"==C&&"square"==A?c.moveTo(n-K,u-K):"rounded"==C||"default"==C&&"rounded"==
+A||"snip"==C||"default"==C&&"snip"==A?c.moveTo(n-K,u-ha-.5*K):("invRound"==C||"default"==C&&"invRound"==A||"fold"==C||"default"==C&&"fold"==A)&&c.moveTo(n-K,u-ha-K):c.moveTo(n-K,u)};Qa.prototype.lineSEInner=function(c,m,v,n,u,A,C,ha,K,wa){wa?"square"==C||"default"==C&&"square"==A?c.lineTo(n-K,u-K):"rounded"==C||"default"==C&&"rounded"==A||"snip"==C||"default"==C&&"snip"==A?c.lineTo(n-K,u-ha-.5*K):("invRound"==C||"default"==C&&"invRound"==A||"fold"==C||"default"==C&&"fold"==A)&&c.lineTo(n-K,u-ha-K):
+c.lineTo(n-K,u)};Qa.prototype.moveNEInner=function(c,m,v,n,u,A,C,ha,K,wa){wa?"square"==C||"default"==C&&"square"==A||wa?c.moveTo(n-K,K):"rounded"==C||"default"==C&&"rounded"==A||"snip"==C||"default"==C&&"snip"==A?c.moveTo(n-K,ha+.5*K):("invRound"==C||"default"==C&&"invRound"==A||"fold"==C||"default"==C&&"fold"==A)&&c.moveTo(n-K,ha+K):c.moveTo(n,K)};Qa.prototype.lineNEInner=function(c,m,v,n,u,A,C,ha,K,wa){wa?"square"==C||"default"==C&&"square"==A||wa?c.lineTo(n-K,K):"rounded"==C||"default"==C&&"rounded"==
+A||"snip"==C||"default"==C&&"snip"==A?c.lineTo(n-K,ha+.5*K):("invRound"==C||"default"==C&&"invRound"==A||"fold"==C||"default"==C&&"fold"==A)&&c.lineTo(n-K,ha+K):c.lineTo(n,K)};Qa.prototype.moveNWInner=function(c,m,v,n,u,A,C,ha,K,wa,ma){wa||ma?!wa&&ma?c.moveTo(K,0):wa&&!ma?c.moveTo(0,K):"square"==C||"default"==C&&"square"==A?c.moveTo(K,K):"rounded"==C||"default"==C&&"rounded"==A||"snip"==C||"default"==C&&"snip"==A?c.moveTo(K,ha+.5*K):("invRound"==C||"default"==C&&"invRound"==A||"fold"==C||"default"==
+C&&"fold"==A)&&c.moveTo(K,ha+K):c.moveTo(0,0)};Qa.prototype.lineNWInner=function(c,m,v,n,u,A,C,ha,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(K,0):wa&&!ma?c.lineTo(0,K):"square"==C||"default"==C&&"square"==A?c.lineTo(K,K):"rounded"==C||"default"==C&&"rounded"==A||"snip"==C||"default"==C&&"snip"==A?c.lineTo(K,ha+.5*K):("invRound"==C||"default"==C&&"invRound"==A||"fold"==C||"default"==C&&"fold"==A)&&c.lineTo(K,ha+K):c.lineTo(0,0)};Qa.prototype.paintFolds=function(c,m,v,n,u,A,C,ha,K,wa,ma,Wa,jb,bb,Ga){if("fold"==
+A||"fold"==C||"fold"==ha||"fold"==K||"fold"==wa)("fold"==C||"default"==C&&"fold"==A)&&Wa&&Ga&&(c.moveTo(0,ma),c.lineTo(ma,ma),c.lineTo(ma,0)),("fold"==ha||"default"==ha&&"fold"==A)&&Wa&&jb&&(c.moveTo(n-ma,0),c.lineTo(n-ma,ma),c.lineTo(n,ma)),("fold"==K||"default"==K&&"fold"==A)&&bb&&jb&&(c.moveTo(n-ma,u),c.lineTo(n-ma,u-ma),c.lineTo(n,u-ma)),("fold"==wa||"default"==wa&&"fold"==A)&&bb&&Ga&&(c.moveTo(0,u-ma),c.lineTo(ma,u-ma),c.lineTo(ma,u))};mxCellRenderer.registerShape(Qa.prototype.cst.RECT2,Qa);
+Qa.prototype.constraints=null;mxUtils.extend($a,mxConnector);$a.prototype.origPaintEdgeShape=$a.prototype.paintEdgeShape;$a.prototype.paintEdgeShape=function(c,m,v){for(var n=[],u=0;u<m.length;u++)n.push(mxUtils.clone(m[u]));u=c.state.dashed;var A=c.state.fixDash;$a.prototype.origPaintEdgeShape.apply(this,[c,n,v]);3<=c.state.strokeWidth&&(n=mxUtils.getValue(this.style,"fillColor",null),null!=n&&(c.setStrokeColor(n),c.setStrokeWidth(c.state.strokeWidth-2),c.setDashed(u,A),$a.prototype.origPaintEdgeShape.apply(this,
+[c,m,v])))};mxCellRenderer.registerShape("filledEdge",$a);"undefined"!==typeof StyleFormatPanel&&function(){var c=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var m=this.editorUi.getSelectionState(),v=c.apply(this,arguments);"umlFrame"==m.style.shape&&v.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return v}}();mxMarker.addMarker("dash",function(c,m,v,n,u,A,C,ha,K,wa){var ma=u*(C+K+1),Wa=A*(C+K+1);return function(){c.begin();
+c.moveTo(n.x-ma/2-Wa/2,n.y-Wa/2+ma/2);c.lineTo(n.x+Wa/2-3*ma/2,n.y-3*Wa/2-ma/2);c.stroke()}});mxMarker.addMarker("box",function(c,m,v,n,u,A,C,ha,K,wa){var ma=u*(C+K+1),Wa=A*(C+K+1),jb=n.x+ma/2,bb=n.y+Wa/2;n.x-=ma;n.y-=Wa;return function(){c.begin();c.moveTo(jb-ma/2-Wa/2,bb-Wa/2+ma/2);c.lineTo(jb-ma/2+Wa/2,bb-Wa/2-ma/2);c.lineTo(jb+Wa/2-3*ma/2,bb-3*Wa/2-ma/2);c.lineTo(jb-Wa/2-3*ma/2,bb-3*Wa/2+ma/2);c.close();wa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,m,v,n,u,A,C,ha,K,
+wa){var ma=u*(C+K+1),Wa=A*(C+K+1);return function(){c.begin();c.moveTo(n.x-ma/2-Wa/2,n.y-Wa/2+ma/2);c.lineTo(n.x+Wa/2-3*ma/2,n.y-3*Wa/2-ma/2);c.moveTo(n.x-ma/2+Wa/2,n.y-Wa/2-ma/2);c.lineTo(n.x-Wa/2-3*ma/2,n.y-3*Wa/2+ma/2);c.stroke()}});mxMarker.addMarker("circle",eb);mxMarker.addMarker("circlePlus",function(c,m,v,n,u,A,C,ha,K,wa){var ma=n.clone(),Wa=eb.apply(this,arguments),jb=u*(C+2*K),bb=A*(C+2*K);return function(){Wa.apply(this,arguments);c.begin();c.moveTo(ma.x-u*K,ma.y-A*K);c.lineTo(ma.x-2*jb+
+u*K,ma.y-2*bb+A*K);c.moveTo(ma.x-jb-bb+A*K,ma.y-bb+jb-u*K);c.lineTo(ma.x+bb-jb-A*K,ma.y-bb-jb+u*K);c.stroke()}});mxMarker.addMarker("halfCircle",function(c,m,v,n,u,A,C,ha,K,wa){var ma=u*(C+K+1),Wa=A*(C+K+1),jb=n.clone();n.x-=ma;n.y-=Wa;return function(){c.begin();c.moveTo(jb.x-Wa,jb.y+ma);c.quadTo(n.x-Wa,n.y+ma,n.x,n.y);c.quadTo(n.x+Wa,n.y-ma,jb.x+Wa,jb.y-ma);c.stroke()}});mxMarker.addMarker("async",function(c,m,v,n,u,A,C,ha,K,wa){m=u*K*1.118;v=A*K*1.118;u*=C+K;A*=C+K;var ma=n.clone();ma.x-=m;ma.y-=
+v;n.x+=-u-m;n.y+=-A-v;return function(){c.begin();c.moveTo(ma.x,ma.y);ha?c.lineTo(ma.x-u-A/2,ma.y-A+u/2):c.lineTo(ma.x+A/2-u,ma.y-A-u/2);c.lineTo(ma.x-u,ma.y-A);c.close();wa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(m,v,n,u,A,C,ha,K,wa,ma){A*=ha+wa;C*=ha+wa;var Wa=u.clone();return function(){m.begin();m.moveTo(Wa.x,Wa.y);K?m.lineTo(Wa.x-A-C/c,Wa.y-C+A/c):m.lineTo(Wa.x+C/c-A,Wa.y-C-A/c);m.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var fb=
+function(c,m,v){return hb(c,["width"],m,function(n,u,A,C,ha){ha=c.shape.getEdgeWidth()*c.view.scale+v;return new mxPoint(C.x+u*n/4+A*ha/2,C.y+A*n/4-u*ha/2)},function(n,u,A,C,ha,K){n=Math.sqrt(mxUtils.ptSegDistSq(C.x,C.y,ha.x,ha.y,K.x,K.y));c.style.width=Math.round(2*n)/c.view.scale-v})},hb=function(c,m,v,n,u){return gb(c,m,function(A){var C=c.absolutePoints,ha=C.length-1;A=c.view.translate;var K=c.view.scale,wa=v?C[0]:C[ha];C=v?C[1]:C[ha-1];ha=C.x-wa.x;var ma=C.y-wa.y,Wa=Math.sqrt(ha*ha+ma*ma);wa=
+n.call(this,Wa,ha/Wa,ma/Wa,wa,C);return new mxPoint(wa.x/K-A.x,wa.y/K-A.y)},function(A,C,ha){var K=c.absolutePoints,wa=K.length-1;A=c.view.translate;var ma=c.view.scale,Wa=v?K[0]:K[wa];K=v?K[1]:K[wa-1];wa=K.x-Wa.x;var jb=K.y-Wa.y,bb=Math.sqrt(wa*wa+jb*jb);C.x=(C.x+A.x)*ma;C.y=(C.y+A.y)*ma;u.call(this,bb,wa/bb,jb/bb,Wa,K,C,ha)})},qb=function(c,m){return function(v){return[hb(v,["startWidth"],!0,function(n,u,A,C,ha){ha=mxUtils.getNumber(v.style,"startWidth",c)*v.view.scale+m;return new mxPoint(C.x+
+u*n/4+A*ha/2,C.y+A*n/4-u*ha/2)},function(n,u,A,C,ha,K){n=Math.sqrt(mxUtils.ptSegDistSq(C.x,C.y,ha.x,ha.y,K.x,K.y));v.style.startWidth=Math.round(2*n)/v.view.scale-m})]}},kb=function(c){return function(m){return[gb(m,["arrowWidth","arrowSize"],function(v){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",Xa.prototype.arrowWidth))),u=Math.max(0,Math.min(c,mxUtils.getValue(this.state.style,"arrowSize",Xa.prototype.arrowSize)));return new mxPoint(v.x+(1-u)*v.width,v.y+(1-n)*v.height/
+2)},function(v,n){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(v.y+v.height/2-n.y)/v.height*2));this.state.style.arrowSize=Math.max(0,Math.min(c,(v.x+v.width-n.x)/v.width))})]}},ib=function(c){return function(m){return[gb(m,["size"],function(v){var n=Math.max(0,Math.min(.5*v.height,parseFloat(mxUtils.getValue(this.state.style,"size",c))));return new mxPoint(v.x,v.y+n)},function(v,n){this.state.style.size=Math.max(0,n.y-v.y)},!0)]}},ub=function(c,m,v){return function(n){var u=[gb(n,["size"],
+function(A){var C=Math.max(0,Math.min(A.width,Math.min(A.height,parseFloat(mxUtils.getValue(this.state.style,"size",m)))))*c;return new mxPoint(A.x+C,A.y+C)},function(A,C){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(A.width,C.x-A.x),Math.min(A.height,C.y-A.y)))/c)},!1)];v&&mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&u.push(lb(n));return u}},ob=function(c,m,v,n,u){v=null!=v?v:.5;return function(A){var C=[gb(A,["size"],function(ha){var K=null!=u?"0"!=mxUtils.getValue(this.state.style,
+"fixedSize","0"):null,wa=parseFloat(mxUtils.getValue(this.state.style,"size",K?u:c));return new mxPoint(ha.x+Math.max(0,Math.min(.5*ha.width,wa*(K?1:ha.width))),ha.getCenterY())},function(ha,K,wa){ha=null!=u&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?K.x-ha.x:Math.max(0,Math.min(v,(K.x-ha.x)/ha.width));this.state.style.size=ha},!1,n)];m&&mxUtils.getValue(A.style,mxConstants.STYLE_ROUNDED,!1)&&C.push(lb(A));return C}},nb=function(c,m,v){c=null!=c?c:.5;return function(n){var u=[gb(n,["size"],
+function(A){var C=null!=v?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ha=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",C?v:m)));return new mxPoint(A.x+Math.min(.75*A.width*c,ha*(C?.75:.75*A.width)),A.y+A.height/4)},function(A,C){A=null!=v&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?C.x-A.x:Math.max(0,Math.min(c,(C.x-A.x)/A.width*.75));this.state.style.size=A},!1,!0)];mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&u.push(lb(n));return u}},wb=
+function(){return function(c){var m=[];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&m.push(lb(c));return m}},lb=function(c,m){return gb(c,[mxConstants.STYLE_ARCSIZE],function(v){var n=null!=m?m:v.height/8;if("1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var u=mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(v.x+v.width-Math.min(v.width/2,u),v.y+n)}u=Math.max(0,parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,
+100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(v.x+v.width-Math.min(Math.max(v.width/2,v.height/2),Math.min(v.width,v.height)*u),v.y+n)},function(v,n,u){"1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(v.width,2*(v.x+v.width-n.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(v.width-n.x+v.x)/Math.min(v.width,v.height))))})},gb=function(c,m,v,n,
+u,A,C){var ha=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);ha.execute=function(wa){for(var ma=0;ma<m.length;ma++)this.copyStyle(m[ma]);C&&C(wa)};ha.getPosition=v;ha.setPosition=n;ha.ignoreGrid=null!=u?u:!0;if(A){var K=ha.positionChanged;ha.positionChanged=function(){K.apply(this,arguments);c.view.invalidate(this.state.cell);c.view.validate()}}return ha},tb={link:function(c){return[fb(c,!0,10),fb(c,!1,10)]},flexArrow:function(c){var m=c.view.graph.gridSize/c.view.scale,v=[];
+mxUtils.getValue(c.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(v.push(hb(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(n,u,A,C,ha){n=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;ha=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(C.x+u*(ha+c.shape.strokewidth*c.view.scale)+A*n/2,C.y+A*(ha+c.shape.strokewidth*c.view.scale)-u*n/2)},function(n,u,A,C,ha,K,wa){n=Math.sqrt(mxUtils.ptSegDistSq(C.x,
+C.y,ha.x,ha.y,K.x,K.y));u=mxUtils.ptLineDist(C.x,C.y,C.x+A,C.y-u,K.x,K.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(u-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*n)/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(wa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<
+m/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE])})),v.push(hb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(n,u,A,C,ha){n=(c.shape.getStartArrowWidth()-c.shape.strokewidth)*c.view.scale;ha=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(C.x+u*(ha+c.shape.strokewidth*c.view.scale)+A*n/2,C.y+A*(ha+c.shape.strokewidth*c.view.scale)-u*n/2)},function(n,u,A,C,ha,
+K,wa){n=Math.sqrt(mxUtils.ptSegDistSq(C.x,C.y,ha.x,ha.y,K.x,K.y));u=mxUtils.ptLineDist(C.x,C.y,C.x+A,C.y-u,K.x,K.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(u-c.shape.strokewidth)/3)/100/c.view.scale;c.style.startWidth=Math.max(0,Math.round(2*n)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE],c.style.endWidth=c.style.startWidth;mxEvent.isAltDown(wa.getEvent())||
+(Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<m/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(c.style.startWidth)-parseFloat(c.style.endWidth))<m&&(c.style.startWidth=c.style.endWidth))})));mxUtils.getValue(c.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(v.push(hb(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(n,u,A,C,ha){n=(c.shape.getEdgeWidth()-
+c.shape.strokewidth)*c.view.scale;ha=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(C.x+u*(ha+c.shape.strokewidth*c.view.scale)-A*n/2,C.y+A*(ha+c.shape.strokewidth*c.view.scale)+u*n/2)},function(n,u,A,C,ha,K,wa){n=Math.sqrt(mxUtils.ptSegDistSq(C.x,C.y,ha.x,ha.y,K.x,K.y));u=mxUtils.ptLineDist(C.x,C.y,C.x+A,C.y-u,K.x,K.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(u-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*
+n)/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(wa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<m/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE])})),v.push(hb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(n,u,A,C,ha){n=
+(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;ha=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(C.x+u*(ha+c.shape.strokewidth*c.view.scale)-A*n/2,C.y+A*(ha+c.shape.strokewidth*c.view.scale)+u*n/2)},function(n,u,A,C,ha,K,wa){n=Math.sqrt(mxUtils.ptSegDistSq(C.x,C.y,ha.x,ha.y,K.x,K.y));u=mxUtils.ptLineDist(C.x,C.y,C.x+A,C.y-u,K.x,K.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(u-c.shape.strokewidth)/3)/100/c.view.scale;
+c.style.endWidth=Math.max(0,Math.round(2*n)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE],c.style.startWidth=c.style.endWidth;mxEvent.isAltDown(wa.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<m/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(c.style.endWidth)-
+parseFloat(c.style.startWidth))<m&&(c.style.endWidth=c.style.startWidth))})));return v},swimlane:function(c){var m=[];if(mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED)){var v=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));m.push(lb(c,v/2))}m.push(gb(c,[mxConstants.STYLE_STARTSIZE],function(n){var u=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(c.style,mxConstants.STYLE_HORIZONTAL,
1)?new mxPoint(n.getCenterX(),n.y+Math.max(0,Math.min(n.height,u))):new mxPoint(n.x+Math.max(0,Math.min(n.width,u)),n.getCenterY())},function(n,u){c.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(n.height,u.y-n.y))):Math.round(Math.max(0,Math.min(n.width,u.x-n.x)))},!1,null,function(n){var u=c.view.graph;if(!mxEvent.isShiftDown(n.getEvent())&&!mxEvent.isControlDown(n.getEvent())&&(u.isTableRow(c.cell)||u.isTableCell(c.cell))){n=
-u.getSwimlaneDirection(c.style);var A=u.model.getParent(c.cell);A=u.model.getChildCells(A,!0);for(var B=[],ca=0;ca<A.length;ca++)A[ca]!=c.cell&&u.isSwimlane(A[ca])&&u.getSwimlaneDirection(u.getCurrentCellStyle(A[ca]))==n&&B.push(A[ca]);u.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],B)}}));return l},label:vb(),ext:vb(),rectangle:vb(),triangle:vb(),rhombus:vb(),umlLifeline:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,
-"size",Y.prototype.size))));return new mxPoint(l.getCenterX(),l.y+v)},function(l,v){this.state.style.size=Math.round(Math.max(0,Math.min(l.height,v.y-l.y)))},!1)]},umlFrame:function(c){return[hb(c,["width","height"],function(l){var v=Math.max(R.prototype.corner,Math.min(l.width,mxUtils.getValue(this.state.style,"width",R.prototype.width))),n=Math.max(1.5*R.prototype.corner,Math.min(l.height,mxUtils.getValue(this.state.style,"height",R.prototype.height)));return new mxPoint(l.x+v,l.y+n)},function(l,
-v){this.state.style.width=Math.round(Math.max(R.prototype.corner,Math.min(l.width,v.x-l.x)));this.state.style.height=Math.round(Math.max(1.5*R.prototype.corner,Math.min(l.height,v.y-l.y)))},!1)]},process:function(c){var l=[hb(c,["size"],function(v){var n="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),u=parseFloat(mxUtils.getValue(this.state.style,"size",ra.prototype.size));return n?new mxPoint(v.x+u,v.y+v.height/4):new mxPoint(v.x+v.width*u,v.y+v.height/4)},function(v,n){v="0"!=mxUtils.getValue(this.state.style,
-"fixedSize","0")?Math.max(0,Math.min(.5*v.width,n.x-v.x)):Math.max(0,Math.min(.5,(n.x-v.x)/v.width));this.state.style.size=v},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},cross:function(c){return[hb(c,["size"],function(l){var v=Math.min(l.width,l.height);v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",Ba.prototype.size)))*v/2;return new mxPoint(l.getCenterX()-v,l.getCenterY()-v)},function(l,v){var n=Math.min(l.width,l.height);this.state.style.size=
-Math.max(0,Math.min(1,Math.min(Math.max(0,l.getCenterY()-v.y)/n*2,Math.max(0,l.getCenterX()-v.x)/n*2)))})]},note:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",P.prototype.size)))));return new mxPoint(l.x+l.width-v,l.y+v)},function(l,v){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-v.x),Math.min(l.height,v.y-l.y))))})]},note2:function(c){return[hb(c,["size"],function(l){var v=
-Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",d.prototype.size)))));return new mxPoint(l.x+l.width-v,l.y+v)},function(l,v){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-v.x),Math.min(l.height,v.y-l.y))))})]},manualInput:function(c){var l=[hb(c,["size"],function(v){var n=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"size",Ca.prototype.size)));return new mxPoint(v.x+v.width/4,v.y+3*n/4)},function(v,
-n){this.state.style.size=Math.round(Math.max(0,Math.min(v.height,4*(n.y-v.y)/3)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},dataStorage:function(c){return[hb(c,["size"],function(l){var v="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),n=parseFloat(mxUtils.getValue(this.state.style,"size",v?J.prototype.fixedSize:J.prototype.size));return new mxPoint(l.x+l.width-n*(v?1:l.width),l.getCenterY())},function(l,v){l="0"!=mxUtils.getValue(this.state.style,
-"fixedSize","0")?Math.max(0,Math.min(l.width,l.x+l.width-v.x)):Math.max(0,Math.min(1,(l.x+l.width-v.x)/l.width));this.state.style.size=l},!1)]},callout:function(c){var l=[hb(c,["size","position"],function(v){var n=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"size",oa.prototype.size))),u=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",oa.prototype.position)));mxUtils.getValue(this.state.style,"base",oa.prototype.base);return new mxPoint(v.x+u*v.width,v.y+v.height-
-n)},function(v,n){mxUtils.getValue(this.state.style,"base",oa.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(v.height,v.y+v.height-n.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(n.x-v.x)/v.width)))/100},!1),hb(c,["position2"],function(v){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",oa.prototype.position2)));return new mxPoint(v.x+n*v.width,v.y+v.height)},function(v,n){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,
-(n.x-v.x)/v.width)))/100},!1),hb(c,["base"],function(v){var n=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"size",oa.prototype.size))),u=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",oa.prototype.position))),A=Math.max(0,Math.min(v.width,mxUtils.getValue(this.state.style,"base",oa.prototype.base)));return new mxPoint(v.x+Math.min(v.width,u*v.width+A),v.y+v.height-n)},function(v,n){var u=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",oa.prototype.position)));
-this.state.style.base=Math.round(Math.max(0,Math.min(v.width,n.x-v.x-u*v.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},internalStorage:function(c){var l=[hb(c,["dx","dy"],function(v){var n=Math.max(0,Math.min(v.width,mxUtils.getValue(this.state.style,"dx",Sa.prototype.dx))),u=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"dy",Sa.prototype.dy)));return new mxPoint(v.x+n,v.y+u)},function(v,n){this.state.style.dx=Math.round(Math.max(0,
-Math.min(v.width,n.x-v.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(v.height,n.y-v.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},module:function(c){return[hb(c,["jettyWidth","jettyHeight"],function(l){var v=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"jettyWidth",ja.prototype.jettyWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"jettyHeight",ja.prototype.jettyHeight)));return new mxPoint(l.x+v/2,l.y+
-2*n)},function(l,v){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(l.width,v.x-l.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(l.height,v.y-l.y))/2)})]},corner:function(c){return[hb(c,["dx","dy"],function(l){var v=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",Pa.prototype.dx))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",Pa.prototype.dy)));return new mxPoint(l.x+v,l.y+n)},function(l,v){this.state.style.dx=Math.round(Math.max(0,
-Math.min(l.width,v.x-l.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,v.y-l.y)))},!1)]},tee:function(c){return[hb(c,["dx","dy"],function(l){var v=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",Za.prototype.dx))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",Za.prototype.dy)));return new mxPoint(l.x+(l.width+v)/2,l.y+n)},function(l,v){this.state.style.dx=Math.round(Math.max(0,2*Math.min(l.width/2,v.x-l.x-l.width/2)));this.state.style.dy=
-Math.round(Math.max(0,Math.min(l.height,v.y-l.y)))},!1)]},singleArrow:nb(1),doubleArrow:nb(.5),"mxgraph.arrows2.wedgeArrow":qb(20,20),"mxgraph.arrows2.wedgeArrowDashed":qb(20,20),"mxgraph.arrows2.wedgeArrowDashed2":qb(20,20),folder:function(c){return[hb(c,["tabWidth","tabHeight"],function(l){var v=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"tabWidth",t.prototype.tabWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"tabHeight",t.prototype.tabHeight)));mxUtils.getValue(this.state.style,
-"tabPosition",t.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(v=l.width-v);return new mxPoint(l.x+v,l.y+n)},function(l,v){var n=Math.max(0,Math.min(l.width,v.x-l.x));mxUtils.getValue(this.state.style,"tabPosition",t.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(n=l.width-n);this.state.style.tabWidth=Math.round(n);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(l.height,v.y-l.y)))},!1)]},document:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
-"size",H.prototype.size))));return new mxPoint(l.x+3*l.width/4,l.y+(1-v)*l.height)},function(l,v){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-v.y)/l.height))},!1)]},tape:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",I.prototype.size))));return new mxPoint(l.getCenterX(),l.y+v*l.height/2)},function(l,v){this.state.style.size=Math.max(0,Math.min(1,(v.y-l.y)/l.height*2))},!1)]},isoCube2:function(c){return[hb(c,
-["isoAngle"],function(l){var v=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",f.isoAngle))))*Math.PI/200;return new mxPoint(l.x,l.y+Math.min(l.width*Math.tan(v),.5*l.height))},function(l,v){this.state.style.isoAngle=Math.max(0,50*(v.y-l.y)/l.height)},!0)]},cylinder2:mb(g.prototype.size),cylinder3:mb(x.prototype.size),offPageConnector:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ea.prototype.size))));
-return new mxPoint(l.getCenterX(),l.y+(1-v)*l.height)},function(l,v){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-v.y)/l.height))},!1)]},"mxgraph.basic.rect":function(c){var l=[Graph.createHandle(c,["size"],function(v){var n=Math.max(0,Math.min(v.width/2,v.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(v.x+n,v.y+n)},function(v,n){this.state.style.size=Math.round(100*Math.max(0,Math.min(v.height/2,v.width/2,n.x-v.x)))/100})];c=Graph.createHandle(c,
-["indent"],function(v){var n=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(v.x+.75*v.width,v.y+n*v.height/200)},function(v,n){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(n.y-v.y)/v.height)))/100});l.push(c);return l},step:wb(na.prototype.size,!0,null,!0,na.prototype.fixedSize),hexagon:wb(N.prototype.size,!0,.5,!0,N.prototype.fixedSize),curlyBracket:wb(M.prototype.size,!1),display:wb(Ka.prototype.size,!1),cube:Bb(1,
-m.prototype.size,!1),card:Bb(.5,D.prototype.size,!0),loopLimit:Bb(.5,W.prototype.size,!0),trapezoid:rb(.5,T.prototype.size,T.prototype.fixedSize),parallelogram:rb(1,S.prototype.size,S.prototype.fixedSize)};Graph.createHandle=hb;Graph.handleFactory=tb;var Cb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=Cb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var l=this.state.style.shape;null==mxCellRenderer.defaultShapes[l]&&
-null==mxStencilRegistry.getStencil(l)?l=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(l=mxConstants.SHAPE_SWIMLANE);l=tb[l];null==l&&null!=this.state.shape&&this.state.shape.isRoundable()&&(l=tb[mxConstants.SHAPE_RECTANGLE]);null!=l&&(l=l(this.state),null!=l&&(c=null==c?l:c.concat(l)))}return c};mxEdgeHandler.prototype.createCustomHandles=function(){var c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&null==mxStencilRegistry.getStencil(c)&&(c=mxConstants.SHAPE_CONNECTOR);
-c=tb[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var xb=new mxPoint(1,0),zb=new mxPoint(1,0),ob=mxUtils.toRadians(-30);xb=mxUtils.getRotatedPoint(xb,Math.cos(ob),Math.sin(ob));var yb=mxUtils.toRadians(-150);zb=mxUtils.getRotatedPoint(zb,Math.cos(yb),Math.sin(yb));mxEdgeStyle.IsometricConnector=function(c,l,v,n,u){var A=c.view;n=null!=n&&0<n.length?n[0]:null;var B=c.absolutePoints,ca=B[0];B=B[B.length-1];null!=n&&(n=A.transformControlPoint(c,n));
-null==ca&&null!=l&&(ca=new mxPoint(l.getCenterX(),l.getCenterY()));null==B&&null!=v&&(B=new mxPoint(v.getCenterX(),v.getCenterY()));var K=xb.x,wa=xb.y,ma=zb.x,Xa=zb.y,jb="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=B&&null!=ca){c=function(Ga,La,Ja){Ga-=bb.x;var Ha=La-bb.y;La=(Xa*Ga-ma*Ha)/(K*Xa-wa*ma);Ga=(wa*Ga-K*Ha)/(wa*ma-K*Xa);jb?(Ja&&(bb=new mxPoint(bb.x+K*La,bb.y+wa*La),u.push(bb)),bb=new mxPoint(bb.x+ma*Ga,bb.y+Xa*Ga)):(Ja&&(bb=new mxPoint(bb.x+ma*Ga,bb.y+Xa*Ga),u.push(bb)),
-bb=new mxPoint(bb.x+K*La,bb.y+wa*La));u.push(bb)};var bb=ca;null==n&&(n=new mxPoint(ca.x+(B.x-ca.x)/2,ca.y+(B.y-ca.y)/2));c(n.x,n.y,!0);c(B.x,B.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ab=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,l){if(l==mxEdgeStyle.IsometricConnector){var v=new mxElbowEdgeHandler(c);v.snapToTerminals=!1;return v}return Ab.apply(this,arguments)};p.prototype.constraints=[];F.prototype.getConstraints=
-function(c,l,v){c=[];var n=Math.tan(mxUtils.toRadians(30)),u=(.5-n)/2;n=Math.min(l,v/(.5+n));l=(l-n)/2;v=(v-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v+.25*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+.5*n,v+n*u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+n,v+.25*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+n,v+.75*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+.5*n,v+(1-u)*n));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,l,v+.75*n));return c};f.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;n=Math.min(l*Math.tan(n),.5*v);c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v-n));c.push(new mxConnectionConstraint(new mxPoint(.5,
-1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));return c};oa.prototype.getConstraints=function(c,l,v){c=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var n=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var u=l*Math.max(0,
-Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(v-n)));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,l,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v-n)));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
+u.getSwimlaneDirection(c.style);var A=u.model.getParent(c.cell);A=u.model.getChildCells(A,!0);for(var C=[],ha=0;ha<A.length;ha++)A[ha]!=c.cell&&u.isSwimlane(A[ha])&&u.getSwimlaneDirection(u.getCurrentCellStyle(A[ha]))==n&&C.push(A[ha]);u.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],C)}}));return m},label:wb(),ext:wb(),rectangle:wb(),triangle:wb(),rhombus:wb(),umlLifeline:function(c){return[gb(c,["size"],function(m){var v=Math.max(0,Math.min(m.height,parseFloat(mxUtils.getValue(this.state.style,
+"size",ba.prototype.size))));return new mxPoint(m.getCenterX(),m.y+v)},function(m,v){this.state.style.size=Math.round(Math.max(0,Math.min(m.height,v.y-m.y)))},!1)]},umlFrame:function(c){return[gb(c,["width","height"],function(m){var v=Math.max(U.prototype.corner,Math.min(m.width,mxUtils.getValue(this.state.style,"width",U.prototype.width))),n=Math.max(1.5*U.prototype.corner,Math.min(m.height,mxUtils.getValue(this.state.style,"height",U.prototype.height)));return new mxPoint(m.x+v,m.y+n)},function(m,
+v){this.state.style.width=Math.round(Math.max(U.prototype.corner,Math.min(m.width,v.x-m.x)));this.state.style.height=Math.round(Math.max(1.5*U.prototype.corner,Math.min(m.height,v.y-m.y)))},!1)]},process:function(c){var m=[gb(c,["size"],function(v){var n="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),u=parseFloat(mxUtils.getValue(this.state.style,"size",ja.prototype.size));return n?new mxPoint(v.x+u,v.y+v.height/4):new mxPoint(v.x+v.width*u,v.y+v.height/4)},function(v,n){v="0"!=mxUtils.getValue(this.state.style,
+"fixedSize","0")?Math.max(0,Math.min(.5*v.width,n.x-v.x)):Math.max(0,Math.min(.5,(n.x-v.x)/v.width));this.state.style.size=v},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&m.push(lb(c));return m},cross:function(c){return[gb(c,["size"],function(m){var v=Math.min(m.width,m.height);v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",Ca.prototype.size)))*v/2;return new mxPoint(m.getCenterX()-v,m.getCenterY()-v)},function(m,v){var n=Math.min(m.width,m.height);this.state.style.size=
+Math.max(0,Math.min(1,Math.min(Math.max(0,m.getCenterY()-v.y)/n*2,Math.max(0,m.getCenterX()-v.x)/n*2)))})]},note:function(c){return[gb(c,["size"],function(m){var v=Math.max(0,Math.min(m.width,Math.min(m.height,parseFloat(mxUtils.getValue(this.state.style,"size",R.prototype.size)))));return new mxPoint(m.x+m.width-v,m.y+v)},function(m,v){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(m.width,m.x+m.width-v.x),Math.min(m.height,v.y-m.y))))})]},note2:function(c){return[gb(c,["size"],function(m){var v=
+Math.max(0,Math.min(m.width,Math.min(m.height,parseFloat(mxUtils.getValue(this.state.style,"size",G.prototype.size)))));return new mxPoint(m.x+m.width-v,m.y+v)},function(m,v){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(m.width,m.x+m.width-v.x),Math.min(m.height,v.y-m.y))))})]},manualInput:function(c){var m=[gb(c,["size"],function(v){var n=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"size",Oa.prototype.size)));return new mxPoint(v.x+v.width/4,v.y+3*n/4)},function(v,
+n){this.state.style.size=Math.round(Math.max(0,Math.min(v.height,4*(n.y-v.y)/3)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&m.push(lb(c));return m},dataStorage:function(c){return[gb(c,["size"],function(m){var v="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),n=parseFloat(mxUtils.getValue(this.state.style,"size",v?H.prototype.fixedSize:H.prototype.size));return new mxPoint(m.x+m.width-n*(v?1:m.width),m.getCenterY())},function(m,v){m="0"!=mxUtils.getValue(this.state.style,
+"fixedSize","0")?Math.max(0,Math.min(m.width,m.x+m.width-v.x)):Math.max(0,Math.min(1,(m.x+m.width-v.x)/m.width));this.state.style.size=m},!1)]},callout:function(c){var m=[gb(c,["size","position"],function(v){var n=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"size",qa.prototype.size))),u=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",qa.prototype.position)));mxUtils.getValue(this.state.style,"base",qa.prototype.base);return new mxPoint(v.x+u*v.width,v.y+v.height-
+n)},function(v,n){mxUtils.getValue(this.state.style,"base",qa.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(v.height,v.y+v.height-n.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(n.x-v.x)/v.width)))/100},!1),gb(c,["position2"],function(v){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",qa.prototype.position2)));return new mxPoint(v.x+n*v.width,v.y+v.height)},function(v,n){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,
+(n.x-v.x)/v.width)))/100},!1),gb(c,["base"],function(v){var n=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"size",qa.prototype.size))),u=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",qa.prototype.position))),A=Math.max(0,Math.min(v.width,mxUtils.getValue(this.state.style,"base",qa.prototype.base)));return new mxPoint(v.x+Math.min(v.width,u*v.width+A),v.y+v.height-n)},function(v,n){var u=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",qa.prototype.position)));
+this.state.style.base=Math.round(Math.max(0,Math.min(v.width,n.x-v.x-u*v.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&m.push(lb(c));return m},internalStorage:function(c){var m=[gb(c,["dx","dy"],function(v){var n=Math.max(0,Math.min(v.width,mxUtils.getValue(this.state.style,"dx",Na.prototype.dx))),u=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"dy",Na.prototype.dy)));return new mxPoint(v.x+n,v.y+u)},function(v,n){this.state.style.dx=Math.round(Math.max(0,
+Math.min(v.width,n.x-v.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(v.height,n.y-v.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&m.push(lb(c));return m},module:function(c){return[gb(c,["jettyWidth","jettyHeight"],function(m){var v=Math.max(0,Math.min(m.width,mxUtils.getValue(this.state.style,"jettyWidth",ya.prototype.jettyWidth))),n=Math.max(0,Math.min(m.height,mxUtils.getValue(this.state.style,"jettyHeight",ya.prototype.jettyHeight)));return new mxPoint(m.x+v/2,m.y+
+2*n)},function(m,v){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(m.width,v.x-m.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(m.height,v.y-m.y))/2)})]},corner:function(c){return[gb(c,["dx","dy"],function(m){var v=Math.max(0,Math.min(m.width,mxUtils.getValue(this.state.style,"dx",La.prototype.dx))),n=Math.max(0,Math.min(m.height,mxUtils.getValue(this.state.style,"dy",La.prototype.dy)));return new mxPoint(m.x+v,m.y+n)},function(m,v){this.state.style.dx=Math.round(Math.max(0,
+Math.min(m.width,v.x-m.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(m.height,v.y-m.y)))},!1)]},tee:function(c){return[gb(c,["dx","dy"],function(m){var v=Math.max(0,Math.min(m.width,mxUtils.getValue(this.state.style,"dx",ab.prototype.dx))),n=Math.max(0,Math.min(m.height,mxUtils.getValue(this.state.style,"dy",ab.prototype.dy)));return new mxPoint(m.x+(m.width+v)/2,m.y+n)},function(m,v){this.state.style.dx=Math.round(Math.max(0,2*Math.min(m.width/2,v.x-m.x-m.width/2)));this.state.style.dy=
+Math.round(Math.max(0,Math.min(m.height,v.y-m.y)))},!1)]},singleArrow:kb(1),doubleArrow:kb(.5),"mxgraph.arrows2.wedgeArrow":qb(20,20),"mxgraph.arrows2.wedgeArrowDashed":qb(20,20),"mxgraph.arrows2.wedgeArrowDashed2":qb(20,20),folder:function(c){return[gb(c,["tabWidth","tabHeight"],function(m){var v=Math.max(0,Math.min(m.width,mxUtils.getValue(this.state.style,"tabWidth",k.prototype.tabWidth))),n=Math.max(0,Math.min(m.height,mxUtils.getValue(this.state.style,"tabHeight",k.prototype.tabHeight)));mxUtils.getValue(this.state.style,
+"tabPosition",k.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(v=m.width-v);return new mxPoint(m.x+v,m.y+n)},function(m,v){var n=Math.max(0,Math.min(m.width,v.x-m.x));mxUtils.getValue(this.state.style,"tabPosition",k.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(n=m.width-n);this.state.style.tabWidth=Math.round(n);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(m.height,v.y-m.y)))},!1)]},document:function(c){return[gb(c,["size"],function(m){var v=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
+"size",I.prototype.size))));return new mxPoint(m.x+3*m.width/4,m.y+(1-v)*m.height)},function(m,v){this.state.style.size=Math.max(0,Math.min(1,(m.y+m.height-v.y)/m.height))},!1)]},tape:function(c){return[gb(c,["size"],function(m){var v=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",B.prototype.size))));return new mxPoint(m.getCenterX(),m.y+v*m.height/2)},function(m,v){this.state.style.size=Math.max(0,Math.min(1,(v.y-m.y)/m.height*2))},!1)]},isoCube2:function(c){return[gb(c,
+["isoAngle"],function(m){var v=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",M.isoAngle))))*Math.PI/200;return new mxPoint(m.x,m.y+Math.min(m.width*Math.tan(v),.5*m.height))},function(m,v){this.state.style.isoAngle=Math.max(0,50*(v.y-m.y)/m.height)},!0)]},cylinder2:ib(Q.prototype.size),cylinder3:ib(e.prototype.size),offPageConnector:function(c){return[gb(c,["size"],function(m){var v=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",fa.prototype.size))));
+return new mxPoint(m.getCenterX(),m.y+(1-v)*m.height)},function(m,v){this.state.style.size=Math.max(0,Math.min(1,(m.y+m.height-v.y)/m.height))},!1)]},"mxgraph.basic.rect":function(c){var m=[Graph.createHandle(c,["size"],function(v){var n=Math.max(0,Math.min(v.width/2,v.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(v.x+n,v.y+n)},function(v,n){this.state.style.size=Math.round(100*Math.max(0,Math.min(v.height/2,v.width/2,n.x-v.x)))/100})];c=Graph.createHandle(c,
+["indent"],function(v){var n=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(v.x+.75*v.width,v.y+n*v.height/200)},function(v,n){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(n.y-v.y)/v.height)))/100});m.push(c);return m},step:ob(sa.prototype.size,!0,null,!0,sa.prototype.fixedSize),hexagon:ob(L.prototype.size,!0,.5,!0,L.prototype.fixedSize),curlyBracket:ob(y.prototype.size,!1),display:ob(Ja.prototype.size,!1),cube:ub(1,
+l.prototype.size,!1),card:ub(.5,t.prototype.size,!0),loopLimit:ub(.5,Z.prototype.size,!0),trapezoid:nb(.5,J.prototype.size,J.prototype.fixedSize),parallelogram:nb(1,O.prototype.size,O.prototype.fixedSize)};Graph.createHandle=gb;Graph.handleFactory=tb;var Cb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=Cb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var m=this.state.style.shape;null==mxCellRenderer.defaultShapes[m]&&
+null==mxStencilRegistry.getStencil(m)?m=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(m=mxConstants.SHAPE_SWIMLANE);m=tb[m];null==m&&null!=this.state.shape&&this.state.shape.isRoundable()&&(m=tb[mxConstants.SHAPE_RECTANGLE]);null!=m&&(m=m(this.state),null!=m&&(c=null==c?m:c.concat(m)))}return c};mxEdgeHandler.prototype.createCustomHandles=function(){var c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&null==mxStencilRegistry.getStencil(c)&&(c=mxConstants.SHAPE_CONNECTOR);
+c=tb[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var xb=new mxPoint(1,0),zb=new mxPoint(1,0),pb=mxUtils.toRadians(-30);xb=mxUtils.getRotatedPoint(xb,Math.cos(pb),Math.sin(pb));var yb=mxUtils.toRadians(-150);zb=mxUtils.getRotatedPoint(zb,Math.cos(yb),Math.sin(yb));mxEdgeStyle.IsometricConnector=function(c,m,v,n,u){var A=c.view;n=null!=n&&0<n.length?n[0]:null;var C=c.absolutePoints,ha=C[0];C=C[C.length-1];null!=n&&(n=A.transformControlPoint(c,n));
+null==ha&&null!=m&&(ha=new mxPoint(m.getCenterX(),m.getCenterY()));null==C&&null!=v&&(C=new mxPoint(v.getCenterX(),v.getCenterY()));var K=xb.x,wa=xb.y,ma=zb.x,Wa=zb.y,jb="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=C&&null!=ha){c=function(Ga,Ka,Ia){Ga-=bb.x;var Ha=Ka-bb.y;Ka=(Wa*Ga-ma*Ha)/(K*Wa-wa*ma);Ga=(wa*Ga-K*Ha)/(wa*ma-K*Wa);jb?(Ia&&(bb=new mxPoint(bb.x+K*Ka,bb.y+wa*Ka),u.push(bb)),bb=new mxPoint(bb.x+ma*Ga,bb.y+Wa*Ga)):(Ia&&(bb=new mxPoint(bb.x+ma*Ga,bb.y+Wa*Ga),u.push(bb)),
+bb=new mxPoint(bb.x+K*Ka,bb.y+wa*Ka));u.push(bb)};var bb=ha;null==n&&(n=new mxPoint(ha.x+(C.x-ha.x)/2,ha.y+(C.y-ha.y)/2));c(n.x,n.y,!0);c(C.x,C.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ab=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,m){if(m==mxEdgeStyle.IsometricConnector){var v=new mxElbowEdgeHandler(c);v.snapToTerminals=!1;return v}return Ab.apply(this,arguments)};p.prototype.constraints=[];E.prototype.getConstraints=
+function(c,m,v){c=[];var n=Math.tan(mxUtils.toRadians(30)),u=(.5-n)/2;n=Math.min(m,v/(.5+n));m=(m-n)/2;v=(v-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,v+.25*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m+.5*n,v+n*u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m+n,v+.25*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m+n,v+.75*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m+.5*n,v+(1-u)*n));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,m,v+.75*n));return c};M.prototype.getConstraints=function(c,m,v){c=[];var n=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;n=Math.min(m*Math.tan(n),.5*v);c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,n));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,v-n));c.push(new mxConnectionConstraint(new mxPoint(.5,
+1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));return c};qa.prototype.getConstraints=function(c,m,v){c=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var n=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var u=m*Math.max(0,
+Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*(v-n)));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,m,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v-n)));m>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,
1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];Fa.prototype.constraints=mxRectangleShape.prototype.constraints;
-mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;aa.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;P.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(l-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(v+n)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};D.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v+n)));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};m.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,Math.min(v,parseFloat(mxUtils.getValue(this.style,
-"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(v+n)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(l+n),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,v-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v-n)));return c};x.prototype.getConstraints=function(c,l,v){c=[];l=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-l));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l+.5*(.5*v-l)));c.push(new mxConnectionConstraint(new mxPoint(1,
-0),!1,null,0,l+.5*(.5*v-l)));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,v-l-.5*(.5*v-l)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-l-.5*(.5*v-l)));c.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*l));c.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*l));c.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-l));c.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-l));return c};t.prototype.getConstraints=
-function(c,l,v){c=[];var n=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),u=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(c.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,n,u)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),u))):(c.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,u)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),u)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,u));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,l,.25*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.75*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,.75*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return c};Sa.prototype.constraints=mxRectangleShape.prototype.constraints;J.prototype.constraints=mxRectangleShape.prototype.constraints;ka.prototype.constraints=mxEllipse.prototype.constraints;xa.prototype.constraints=mxEllipse.prototype.constraints;
-ta.prototype.constraints=mxEllipse.prototype.constraints;Ma.prototype.constraints=mxEllipse.prototype.constraints;Ca.prototype.constraints=mxRectangleShape.prototype.constraints;Qa.prototype.constraints=mxRectangleShape.prototype.constraints;Ka.prototype.getConstraints=function(c,l,v){c=[];var n=Math.min(l,v/2),u=Math.min(l-n,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*l);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,u,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(u+l-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(u+l-n),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,v));return c};ja.prototype.getConstraints=function(c,l,v){l=parseFloat(mxUtils.getValue(c,
-"jettyWidth",ja.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,"jettyHeight",ja.prototype.jettyHeight));var n=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,l),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,l),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(v-.5*c,1.5*c)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(v-.5*c,3.5*c))];v>5*c&&n.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,l));v>8*c&&n.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1,null,l));v>15*c&&n.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,l));return n};W.prototype.constraints=mxRectangleShape.prototype.constraints;ea.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)];X.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)];sa.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,
+mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;V.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;R.prototype.getConstraints=function(c,m,v){c=[];var n=Math.max(0,Math.min(m,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(m-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*(v+n)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));m>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};t.prototype.getConstraints=function(c,m,v){c=[];var n=Math.max(0,Math.min(m,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v+n)));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));m>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};l.prototype.getConstraints=function(c,m,v){c=[];var n=Math.max(0,Math.min(m,Math.min(v,parseFloat(mxUtils.getValue(this.style,
+"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*(v+n)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(m+n),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,v-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v-n)));return c};e.prototype.getConstraints=function(c,m,v){c=[];m=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,m));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,m));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-m));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-m));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,m+.5*(.5*v-m)));c.push(new mxConnectionConstraint(new mxPoint(1,
+0),!1,null,0,m+.5*(.5*v-m)));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,v-m-.5*(.5*v-m)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-m-.5*(.5*v-m)));c.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*m));c.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*m));c.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-m));c.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-m));return c};k.prototype.getConstraints=
+function(c,m,v){c=[];var n=Math.max(0,Math.min(m,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),u=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(c.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,n,u)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+n),u))):(c.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-.5*n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-n,u)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-n),u)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,u));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,m,.25*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.75*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,.75*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return c};Na.prototype.constraints=mxRectangleShape.prototype.constraints;H.prototype.constraints=mxRectangleShape.prototype.constraints;la.prototype.constraints=mxEllipse.prototype.constraints;za.prototype.constraints=mxEllipse.prototype.constraints;
+ua.prototype.constraints=mxEllipse.prototype.constraints;Pa.prototype.constraints=mxEllipse.prototype.constraints;Oa.prototype.constraints=mxRectangleShape.prototype.constraints;Ra.prototype.constraints=mxRectangleShape.prototype.constraints;Ja.prototype.getConstraints=function(c,m,v){c=[];var n=Math.min(m,v/2),u=Math.min(m-n,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*m);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,u,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(u+m-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-n,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-n,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(u+m-n),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,v));return c};ya.prototype.getConstraints=function(c,m,v){m=parseFloat(mxUtils.getValue(c,
+"jettyWidth",ya.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,"jettyHeight",ya.prototype.jettyHeight));var n=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,m),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
+.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,m),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(v-.5*c,1.5*c)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(v-.5*c,3.5*c))];v>5*c&&n.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,m));v>8*c&&n.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1,null,m));v>15*c&&n.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,m));return n};Z.prototype.constraints=mxRectangleShape.prototype.constraints;fa.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)];W.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)];va.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)];y.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)];I.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)];na.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)];Z.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,
+.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];f.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,
+.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];B.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,
+.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];sa.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)];ca.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)];S.prototype.constraints=mxRectangleShape.prototype.constraints;T.prototype.constraints=mxRectangleShape.prototype.constraints;H.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(c,l,v){c=[];var n=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),u=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,
-"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*l+.25*n,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),u));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(l+n),.5*(v+u)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),v));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),.5*(v+u)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*l-.25*n,u));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*u));return c};Pa.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),u=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,l,.5*u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.5*(v+u)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,v));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-1),!1));return c};Ta.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(c,l,v){c=[];var n=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),u=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));n=(v-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-u),n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-u,0));c.push(new mxConnectionConstraint(new mxPoint(1,
-.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-u,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-u),v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));return c};z.prototype.getConstraints=function(c,l,v){c=[];var n=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Na.prototype.arrowWidth)))),u=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Na.prototype.arrowSize))));n=(v-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-u,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-u,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,v));return c};Ba.prototype.getConstraints=
-function(c,l,v){c=[];var n=Math.min(v,l),u=Math.max(0,Math.min(n,n*parseFloat(mxUtils.getValue(this.style,"size",this.size))));n=(v-u)/2;var A=n+u,B=(l-u)/2;u=B+u;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,0));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,u,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,v-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,v));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,v-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+u),n));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+u),A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*B,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*B,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,n));return c};Y.prototype.constraints=null;O.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)];U.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)];qa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];va.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
+.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)];O.prototype.constraints=mxRectangleShape.prototype.constraints;J.prototype.constraints=mxRectangleShape.prototype.constraints;I.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
+0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;ab.prototype.getConstraints=function(c,m,v){c=[];var n=Math.max(0,Math.min(m,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),u=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,
+"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*m+.25*n,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+n),u));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(m+n),.5*(v+u)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+n),v));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-n),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-n),.5*(v+u)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-n),u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*m-.25*n,u));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*u));return c};La.prototype.getConstraints=function(c,m,v){c=[];var n=Math.max(0,Math.min(m,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),u=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,m,.5*u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+n),u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.5*(v+u)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,v));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+1),!1));return c};Ba.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)];Xa.prototype.getConstraints=
+function(c,m,v){c=[];var n=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),u=m*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));n=(v-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-u),n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-u,0));c.push(new mxConnectionConstraint(new mxPoint(1,
+.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-u,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-u),v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));return c};x.prototype.getConstraints=function(c,m,v){c=[];var n=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Xa.prototype.arrowWidth)))),u=m*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Xa.prototype.arrowSize))));n=(v-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*m,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-u,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-u,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*m,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,v));return c};Ca.prototype.getConstraints=
+function(c,m,v){c=[];var n=Math.min(v,m),u=Math.max(0,Math.min(n,n*parseFloat(mxUtils.getValue(this.style,"size",this.size))));n=(v-u)/2;var A=n+u,C=(m-u)/2;u=C+u;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,C,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,C,0));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,u,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,C,v-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,C,v));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,v-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+u),n));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,m,n));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+u),A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,C,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*C,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*C,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,C,n));return c};ba.prototype.constraints=null;P.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,
+.9),!1)];X.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];na.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ra.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(d){p.escape();d=p.deleteCells(p.getDeletableCells(p.getSelectionCells()),d);null!=d&&p.setSelectionCells(d)}function e(){if(!p.isSelectionEmpty()){p.getModel().beginUpdate();try{for(var d=p.getSelectionCells(),f=0;f<d.length;f++)p.cellLabelChanged(d[f],"")}finally{p.getModel().endUpdate()}}}function k(d,f,g,x,y){y.getModel().beginUpdate();try{var t=y.getCellGeometry(d);null!=t&&g&&x&&(g/=x,t=t.clone(),1<g?t.height=t.width/g:t.width=t.height*g,y.getModel().setGeometry(d,
-t));y.setCellStyles(mxConstants.STYLE_CLIP_PATH,f,[d]);y.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[d])}finally{y.getModel().endUpdate()}}var m=this.editorUi,C=m.editor,p=C.graph,F=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.addAction("smartFit",function(){p.popupMenuHandler.hideMenu();var d=p.view.scale,
-f=p.view.translate.x,g=p.view.translate.y;m.actions.get("resetView").funct();1E-5>Math.abs(d-p.view.scale)&&f==p.view.translate.x&&g==p.view.translate.y&&m.actions.get(p.pageVisible?"fitPage":"fitWindow").funct()});this.addAction("keyPressEnter",function(){p.isEnabled()&&(p.isSelectionEmpty()?m.actions.get("smartFit").funct():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(d,f){try{var g=mxUtils.parseXml(d);C.graph.setSelectionCells(C.graph.importGraphModel(g.documentElement))}catch(x){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+x.message)}}));m.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=F;this.addAction("save",function(){m.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=F;this.addAction("saveAs...",function(){m.saveFile(!0)},null,
-null,Editor.ctrlKey+"+Shift+S").isEnabled=F;this.addAction("export...",function(){m.showDialog((new ExportDialog(m)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var d=new EditDiagramDialog(m);m.showDialog(d.container,620,420,!0,!1);d.init()});this.addAction("pageSetup...",function(){m.showDialog((new PageSetupDialog(m)).container,320,240,!0,!0)}).isEnabled=F;this.addAction("print...",function(){m.showDialog((new PrintDialog(m)).container,300,180,!0,!0)},null,"sprite-print",
-Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(p,null,10,10)});this.addAction("undo",function(){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 d=null;try{d=m.copyXml(),null!=d&&p.removeCells(d,!1)}catch(f){}null==d&&mxClipboard.cut(p)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{m.copyXml()}catch(d){}try{mxClipboard.copy(p)}catch(d){m.handleError(d)}},
-null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var d=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(f){if(null!=f){p.getModel().beginUpdate();try{m.pasteXml(f,!0)}finally{p.getModel().endUpdate()}}else mxClipboard.paste(p)}),d=!0)}catch(f){}d||mxClipboard.paste(p)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(d){function f(x){if(null!=x){for(var y=!0,t=0;t<
-x.length&&y;t++)y=y&&p.model.isEdge(x[t]);var G=p.view.translate;t=p.view.scale;var D=G.x,I=G.y;G=null;if(1==x.length&&y){var H=p.getCellGeometry(x[0]);null!=H&&(G=H.getTerminalPoint(!0))}G=null!=G?G:p.getBoundingBoxFromGeometry(x,y);null!=G&&(y=Math.round(p.snap(p.popupMenuHandler.triggerX/t-D)),t=Math.round(p.snap(p.popupMenuHandler.triggerY/t-I)),p.cellsMoved(x,y-G.x,t-G.y))}}function g(){p.getModel().beginUpdate();try{f(mxClipboard.paste(p))}finally{p.getModel().endUpdate()}}if(p.isEnabled()&&
-!p.isCellLocked(p.getDefaultParent())){d=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(x){if(null!=x){p.getModel().beginUpdate();try{f(m.pasteXml(x,!0))}finally{p.getModel().endUpdate()}}else g()}),d=!0)}catch(x){}d||g()}});this.addAction("copySize",function(){var d=p.getSelectionCell();p.isEnabled()&&null!=d&&p.getModel().isVertex(d)&&(d=p.getCellGeometry(d),null!=d&&(m.copiedSize=new mxRectangle(d.x,d.y,d.width,d.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",
-function(){if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=m.copiedSize){p.getModel().beginUpdate();try{for(var d=p.getResizableCells(p.getSelectionCells()),f=0;f<d.length;f++)if(p.getModel().isVertex(d[f])){var g=p.getCellGeometry(d[f]);null!=g&&(g=g.clone(),g.width=m.copiedSize.width,g.height=m.copiedSize.height,p.getModel().setGeometry(d[f],g))}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var d=p.getSelectionCell()||p.getModel().getRoot();p.isEnabled()&&
-null!=d&&(d=d.cloneValue(),null==d||isNaN(d.nodeType)||(m.copiedValue=d))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(d,f){function g(t,G){var D=x.getValue(t);G=t.cloneValue(G);G.removeAttribute("placeholders");null==D||isNaN(D.nodeType)||G.setAttribute("placeholders",D.getAttribute("placeholders"));null!=d&&mxEvent.isShiftDown(d)||G.setAttribute("label",p.convertValueToString(t));x.setValue(t,G)}d=null!=f?f:d;var x=p.getModel();if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=m.copiedValue){x.beginUpdate();
-try{var y=p.getEditableCells(p.getSelectionCells());if(0==y.length)g(x.getRoot(),m.copiedValue);else for(f=0;f<y.length;f++)g(y[f],m.copiedValue)}finally{x.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(d,f){d=null!=f?f:d;null!=d&&mxEvent.isShiftDown(d)?e():b(null!=d&&(mxEvent.isControlDown(d)||mxEvent.isMetaDown(d)||mxEvent.isAltDown(d)))},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(d){m.handleError(d)}},null,null,Editor.ctrlKey+"+D");this.put("mergeCells",new Action(mxResources.get("merge"),function(){var d=m.getSelectionState();if(null!=d.mergeCell){p.getModel().beginUpdate();try{p.setCellStyles("rowspan",d.rowspan,[d.mergeCell]),p.setCellStyles("colspan",d.colspan,[d.mergeCell])}finally{p.getModel().endUpdate()}}}));this.put("unmergeCells",
-new Action(mxResources.get("unmerge"),function(){var d=m.getSelectionState();if(0<d.cells.length){p.getModel().beginUpdate();try{p.setCellStyles("rowspan",null,d.cells),p.setCellStyles("colspan",null,d.cells)}finally{p.getModel().endUpdate()}}}));this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(d,f){d=null!=f?f:d;p.turnShapes(p.getResizableCells(p.getSelectionCells()),null!=d?mxEvent.isShiftDown(d):!1)},null,null,mxClient.IS_SF?null:Editor.ctrlKey+"+R"));
-this.put("selectConnections",new Action(mxResources.get("selectEdges"),function(d){d=p.getSelectionCell();p.isEnabled()&&null!=d&&p.addSelectionCells(p.getEdges(d))}));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 d=p.getSelectionCells(),f=p.getCurrentCellStyle(p.getSelectionCell()),g=1==mxUtils.getValue(f,mxConstants.STYLE_EDITABLE,1)?0:1;p.setCellStyles(mxConstants.STYLE_MOVABLE,g,d);p.setCellStyles(mxConstants.STYLE_RESIZABLE,g,d);p.setCellStyles(mxConstants.STYLE_ROTATABLE,g,d);p.setCellStyles(mxConstants.STYLE_DELETABLE,g,d);p.setCellStyles(mxConstants.STYLE_EDITABLE,
-g,d);p.setCellStyles("connectable",g,d)}finally{p.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");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(d){p.orderCells(!1,null,!0)});this.addAction("sendBackward",function(d){p.orderCells(!0,null,!0)});this.addAction("group",function(){if(p.isEnabled()){var d=mxUtils.sortCells(p.getSelectionCells(),!0);1!=d.length||p.isTable(d[0])||p.isTableRow(d[0])?
-(d=p.getCellsForGroup(d),1<d.length&&p.setSelectionCell(p.groupCells(null,0,d))):p.setCellStyles("container","1")}},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){if(p.isEnabled()){var d=p.getEditableCells(p.getSelectionCells());p.model.beginUpdate();try{var f=p.ungroupCells();if(null!=d)for(var g=0;g<d.length;g++)p.model.contains(d[g])&&(0==p.model.getChildCount(d[g])&&p.model.isVertex(d[g])&&p.setCellStyles("container","0",[d[g]]),f.push(d[g]))}finally{p.model.endUpdate()}0<
-f.length&&p.setSelectionCells(f)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(p.isEnabled()){var d=p.getSelectionCells();if(null!=d){for(var f=[],g=0;g<d.length;g++)p.isTableRow(d[g])||p.isTableCell(d[g])||f.push(d[g]);p.removeCellsFromParent(f)}}});this.addAction("edit",function(){p.isEnabled()&&p.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var d=p.getSelectionCell()||p.getModel().getRoot();m.showDataDialog(d)},null,
-null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var d=p.getSelectionCell();if(p.isEnabled()&&null!=d&&p.isCellEditable(d)){var f="";if(mxUtils.isNode(d.value)){var g=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&d.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(g=d.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==g&&(g=d.value.getAttribute("tooltip"));null!=g&&(f=g)}f=new TextareaDialog(m,mxResources.get("editTooltip")+":",f,function(x){p.setTooltipForCell(d,
-x)});m.showDialog(f.container,320,200,!0,!0);f.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var d=p.getLinkForCell(p.getSelectionCell());null!=d&&p.openLink(d)});this.addAction("editLink...",function(){var d=p.getSelectionCell();if(p.isEnabled()&&null!=d&&p.isCellEditable(d)){var f=p.getLinkForCell(d)||"";m.showLinkDialog(f,mxResources.get("apply"),function(g,x,y){g=mxUtils.trim(g);p.setLinkForCell(d,0<g.length?g:null);p.setAttributeForCell(d,"linkTarget",y)},!0,p.getLinkTargetForCell(d))}},
-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=F;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&m.showLinkDialog("",mxResources.get("insert"),function(d,f,g){d=mxUtils.trim(d);if(0<d.length){var x=null,y=p.getLinkTitle(d);null!=f&&0<f.length&&(x=f[0].iconUrl,
-y=f[0].name||f[0].type,y=y.charAt(0).toUpperCase()+y.substring(1),30<y.length&&(y=y.substring(0,30)+"..."));f=new mxCell(y,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=x?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+x:"spacing=10;"));f.vertex=!0;x=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry([f],!0));f.geometry.x=x.x;f.geometry.y=x.y;p.setAttributeForCell(f,"linkTarget",g);p.setLinkForCell(f,d);p.cellSizeUpdated(f,
-!0);p.getModel().beginUpdate();try{f=p.addCell(f),p.fireEvent(new mxEventObject("cellsInserted","cells",[f]))}finally{p.getModel().endUpdate()}p.setSelectionCell(f);p.scrollCellToVisible(p.getSelectionCell())}},!0)})).isEnabled=F;this.addAction("link...",mxUtils.bind(this,function(){if(p.isEnabled())if(p.cellEditor.isContentEditing()){var d=p.getSelectedElement(),f=p.getParentByName(d,"A",p.cellEditor.textarea),g="";if(null==f&&null!=d&&null!=d.getElementsByTagName)for(var x=d.getElementsByTagName("a"),
-y=0;y<x.length&&null==f;y++)x[y].textContent==d.textContent&&(f=x[y]);null!=f&&"A"==f.nodeName&&(g=f.getAttribute("href")||"",p.selectNode(f));var t=p.cellEditor.saveSelection();m.showLinkDialog(g,mxResources.get("apply"),mxUtils.bind(this,function(G){p.cellEditor.restoreSelection(t);null!=G&&p.insertLink(G)}))}else p.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=F;this.addAction("autosize",function(){var d=p.getSelectionCells();if(null!=d){p.getModel().beginUpdate();
-try{for(var f=0;f<d.length;f++){var g=d[f];p.getModel().isVertex(g)&&(0<p.getModel().getChildCount(g)?p.updateGroupBounds([g],0,!0):p.updateCellSize(g))}}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 d=p.getCommonStyle(p.getSelectionCells());d="1"==mxUtils.getValue(d,"html","0")?null:"1";p.getModel().beginUpdate();try{for(var f=
-p.getEditableCells(p.getSelectionCells()),g=0;g<f.length;g++)if(state=p.getView().getState(f[g]),null!=state){var x=mxUtils.getValue(state.style,"html","0");if("1"==x&&null==d){var y=p.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(y=y.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var t=document.createElement("div");t.innerHTML=p.sanitizeHtml(y);y=mxUtils.extractTextWithWhitespace(t.childNodes);p.cellLabelChanged(state.cell,y);p.setCellStyles("html",d,[f[g]])}else"0"==
-x&&"1"==d&&(y=mxUtils.htmlEntities(p.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(y=y.replace(/\n/g,"<br/>")),p.cellLabelChanged(state.cell,p.sanitizeHtml(y)),p.setCellStyles("html",d,[f[g]]))}m.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=d?d:"0"],"cells",f))}finally{p.getModel().endUpdate()}});this.addAction("wordWrap",function(){var d=p.getView().getState(p.getSelectionCell()),f="wrap";p.stopEditing();null!=d&&"wrap"==d.style[mxConstants.STYLE_WHITE_SPACE]&&
-(f=null);p.setCellStyles(mxConstants.STYLE_WHITE_SPACE,f)});this.addAction("rotation",function(){var d="0",f=p.getView().getState(p.getSelectionCell());null!=f&&(d=f.style[mxConstants.STYLE_ROTATION]||d);d=new FilenameDialog(m,d,mxResources.get("apply"),function(g){null!=g&&0<g.length&&p.setCellStyles(mxConstants.STYLE_ROTATION,g)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");m.showDialog(d.container,375,80,!0,!0);d.init()});this.addAction("resetView",function(){p.zoomTo(1);
-m.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",function(d){p.isFastZoomEnabled()?p.lazyZoom(!0,!0,m.buttonZoomDelay):p.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(d){p.isFastZoomEnabled()?p.lazyZoom(!1,!0,m.buttonZoomDelay):p.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var d=p.isSelectionEmpty()?p.getGraphBounds():p.getBoundingBox(p.getSelectionCells()),f=p.view.translate,
-g=p.view.scale;d.x=d.x/g-f.x;d.y=d.y/g-f.y;d.width/=g;d.height/=g;null!=p.backgroundImage&&(d=mxRectangle.fromRectangle(d),d.add(new mxRectangle(0,0,p.backgroundImage.width,p.backgroundImage.height)));0==d.width||0==d.height?(p.zoomTo(1),m.resetScrollbars()):(f=Editor.fitWindowBorders,null!=f&&(d.x-=f.x,d.y-=f.y,d.width+=f.width+f.x,d.height+=f.height+f.y),p.fitWindow(d))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){p.pageVisible||this.get("pageView").funct();
-var d=p.pageFormat,f=p.pageScale;p.zoomTo(Math.floor(20*Math.min((p.container.clientWidth-10)/d.width/f,(p.container.clientHeight-10)/d.height/f))/20);mxUtils.hasScrollbars(p.container)&&(d=p.getPagePadding(),p.container.scrollTop=d.y*p.view.scale-1,p.container.scrollLeft=Math.min(d.x*p.view.scale,(p.container.scrollWidth-p.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){p.pageVisible||this.get("pageView").funct();var d=p.pageFormat,
-f=p.pageScale;p.zoomTo(Math.floor(20*Math.min((p.container.clientWidth-10)/(2*d.width)/f,(p.container.clientHeight-10)/d.height/f))/20);mxUtils.hasScrollbars(p.container)&&(d=p.getPagePadding(),p.container.scrollTop=Math.min(d.y,(p.container.scrollHeight-p.container.clientHeight)/2),p.container.scrollLeft=Math.min(d.x,(p.container.scrollWidth-p.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){p.pageVisible||this.get("pageView").funct();
-p.zoomTo(Math.floor(20*(p.container.clientWidth-10)/p.pageFormat.width/p.pageScale)/20);if(mxUtils.hasScrollbars(p.container)){var d=p.getPagePadding();p.container.scrollLeft=Math.min(d.x*p.view.scale,(p.container.scrollWidth-p.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var d=new FilenameDialog(this.editorUi,parseInt(100*p.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(f){f=parseInt(f);!isNaN(f)&&
-0<f&&p.zoomTo(f/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(d.container,300,80,!0,!0);d.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var d=new FilenameDialog(this.editorUi,parseInt(100*p.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(f){f=parseInt(f);!isNaN(f)&&0<f&&(f=new ChangePageSetup(m,null,null,null,f/100),f.ignoreColor=!0,f.ignoreImage=!0,p.model.execute(f))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(d.container,
-300,80,!0,!0);d.init()}));var L=null;L=this.addAction("grid",function(){p.setGridEnabled(!p.isGridEnabled());p.defaultGridEnabled=p.isGridEnabled();m.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");L.setToggleAction(!0);L.setSelectedCallback(function(){return p.isGridEnabled()});L.setEnabled(!1);L=this.addAction("guides",function(){p.graphHandler.guidesEnabled=!p.graphHandler.guidesEnabled;m.fireEvent(new mxEventObject("guidesEnabledChanged"))});L.setToggleAction(!0);
-L.setSelectedCallback(function(){return p.graphHandler.guidesEnabled});L.setEnabled(!1);L=this.addAction("tooltips",function(){p.tooltipHandler.setEnabled(!p.tooltipHandler.isEnabled());m.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});L.setToggleAction(!0);L.setSelectedCallback(function(){return p.tooltipHandler.isEnabled()});L=this.addAction("collapseExpand",function(){var d=new ChangePageSetup(m);d.ignoreColor=!0;d.ignoreImage=!0;d.foldingEnabled=!p.foldingEnabled;p.model.execute(d)});
-L.setToggleAction(!0);L.setSelectedCallback(function(){return p.foldingEnabled});L.isEnabled=F;L=this.addAction("scrollbars",function(){m.setScrollbars(!m.hasScrollbars())});L.setToggleAction(!0);L.setSelectedCallback(function(){return p.scrollbars});L=this.addAction("pageView",mxUtils.bind(this,function(){m.setPageVisible(!p.pageVisible)}));L.setToggleAction(!0);L.setSelectedCallback(function(){return p.pageVisible});L=this.addAction("connectionArrows",function(){p.connectionArrowsEnabled=!p.connectionArrowsEnabled;
-m.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");L.setToggleAction(!0);L.setSelectedCallback(function(){return p.connectionArrowsEnabled});L=this.addAction("connectionPoints",function(){p.setConnectable(!p.connectionHandler.isEnabled());m.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");L.setToggleAction(!0);L.setSelectedCallback(function(){return p.connectionHandler.isEnabled()});L=this.addAction("copyConnect",function(){p.connectionHandler.setCreateTarget(!p.connectionHandler.isCreateTarget());
-m.fireEvent(new mxEventObject("copyConnectChanged"))});L.setToggleAction(!0);L.setSelectedCallback(function(){return p.connectionHandler.isCreateTarget()});L.isEnabled=F;L=this.addAction("autosave",function(){m.editor.setAutosave(!m.editor.autosave)});L.setToggleAction(!0);L.setSelectedCallback(function(){return m.editor.autosave});L.isEnabled=F;L.visible=!1;this.addAction("help",function(){var d="";mxResources.isLanguageSupported(mxClient.language)&&(d="_"+mxClient.language);p.openLink(RESOURCES_PATH+
-"/help"+d+".html")});var P=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){P||(m.showDialog((new AboutDialog(m)).container,320,280,!0,!0,function(){P=!1}),P=!0)}));L=mxUtils.bind(this,function(d,f,g,x){return this.addAction(d,function(){if(null!=g&&p.cellEditor.isContentEditing())g();else{p.stopEditing(!1);p.getModel().beginUpdate();try{var y=p.getEditableCells(p.getSelectionCells());p.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,f,y);(f&mxConstants.FONT_BOLD)==
-mxConstants.FONT_BOLD?p.updateLabelElements(y,function(G){G.style.fontWeight=null;"B"==G.nodeName&&p.replaceElement(G)}):(f&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?p.updateLabelElements(y,function(G){G.style.fontStyle=null;"I"==G.nodeName&&p.replaceElement(G)}):(f&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&p.updateLabelElements(y,function(G){G.style.textDecoration=null;"U"==G.nodeName&&p.replaceElement(G)});for(var t=0;t<y.length;t++)0==p.model.getChildCount(y[t])&&p.autoSizeCell(y[t],
-!1)}finally{p.getModel().endUpdate()}}},null,null,x)});L("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");L("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");L("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")});this.addAction("strokeColor...",
-function(){m.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){m.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){m.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});this.addAction("backgroundColor...",function(){m.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){m.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});this.addAction("vertical",function(){m.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,
-!0)});this.addAction("shadow",function(){m.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_DASHED,null),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("dashed",function(){p.getModel().beginUpdate();
-try{p.setCellStyles(mxConstants.STYLE_DASHED,"1"),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),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 d=p.getSelectionCells(),f=p.getCurrentCellStyle(d[0]),
-g="1"==mxUtils.getValue(f,mxConstants.STYLE_ROUNDED,"0")?"0":"1";p.setCellStyles(mxConstants.STYLE_ROUNDED,g);p.setCellStyles(mxConstants.STYLE_CURVED,null);m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[g,"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 d=p.view.getState(p.getSelectionCell()),f="1";null!=d&&null!=p.getFoldingImage(d)&&(f="0");p.setCellStyles("collapsible",f);m.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[f],"cells",p.getSelectionCells()))});this.addAction("editStyle...",
-mxUtils.bind(this,function(){var d=p.getEditableCells(p.getSelectionCells());if(null!=d&&0<d.length){var f=p.getModel();f=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",f.getStyle(d[0])||"",function(g){null!=g&&p.setCellStyle(mxUtils.trim(g),d)},null,null,400,220);this.editorUi.showDialog(f.container,420,300,!0,!0);f.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 d=p.getSelectionCell();if(null!=d&&p.getModel().isEdge(d)){var f=C.graph.selectionCellsHandler.getHandler(d);if(f instanceof mxEdgeHandler){var g=p.view.translate,x=p.view.scale,y=g.x;g=g.y;d=p.getModel().getParent(d);for(var t=p.getCellGeometry(d);p.getModel().isVertex(d)&&null!=t;)y+=t.x,g+=t.y,d=
-p.getModel().getParent(d),t=p.getCellGeometry(d);y=Math.round(p.snap(p.popupMenuHandler.triggerX/x-y));x=Math.round(p.snap(p.popupMenuHandler.triggerY/x-g));f.addPointAt(f.state,y,x)}}});this.addAction("removeWaypoint",function(){var d=m.actions.get("removeWaypoint");null!=d.handler&&d.handler.removePoint(d.handler.state,d.index)});this.addAction("clearWaypoints",function(d,f){d=null!=f?f:d;var g=p.getSelectionCells();if(null!=g){g=p.getEditableCells(p.addAllEdges(g));p.getModel().beginUpdate();try{for(var x=
-0;x<g.length;x++){var y=g[x];if(p.getModel().isEdge(y)){var t=p.getCellGeometry(y);null!=f&&mxEvent.isShiftDown(d)?(p.setCellStyles(mxConstants.STYLE_EXIT_X,null,[y]),p.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[y]),p.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[y]),p.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[y])):null!=t&&(t=t.clone(),t.points=null,t.x=0,t.y=0,t.offset=null,p.getModel().setGeometry(y,t))}}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+C");L=this.addAction("subscript",
-mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");L=this.addAction("superscript",mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var d=mxResources.get("image")+" ("+mxResources.get("url")+"):",f=p.getView().getState(p.getSelectionCell()),
-g="",x=null;null!=f&&(g=f.style[mxConstants.STYLE_IMAGE]||g,x=f.style[mxConstants.STYLE_CLIP_PATH]||x);var y=p.cellEditor.saveSelection();m.showImageDialog(d,g,function(t,G,D,I,H,S){if(p.cellEditor.isContentEditing())p.cellEditor.restoreSelection(y),p.insertImage(t,G,D);else{var T=p.getSelectionCells();if(null!=t&&(0<t.length||0<T.length)){var M=null;p.getModel().beginUpdate();try{if(0==T.length){T=[p.insertVertex(p.getDefaultParent(),null,"",0,0,G,D,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];
-var fa=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry(T,!0));T[0].geometry.x=fa.x;T[0].geometry.y=fa.y;null!=I&&k(T[0],I,H,S,p);M=T;p.fireEvent(new mxEventObject("cellsInserted","cells",M))}p.setCellStyles(mxConstants.STYLE_IMAGE,0<t.length?t:null,T);var la=p.getCurrentCellStyle(T[0]);"image"!=la[mxConstants.STYLE_SHAPE]&&"label"!=la[mxConstants.STYLE_SHAPE]?p.setCellStyles(mxConstants.STYLE_SHAPE,"image",T):0==t.length&&p.setCellStyles(mxConstants.STYLE_SHAPE,null,T);null==I&&p.setCellStyles(mxConstants.STYLE_CLIP_PATH,
-null,T);if(null!=G&&null!=D)for(t=0;t<T.length;t++){var ra=T[t];if("0"!=p.getCurrentCellStyle(ra).expand){var ba=p.getModel().getGeometry(ra);null!=ba&&(ba=ba.clone(),ba.width=G,ba.height=D,p.getModel().setGeometry(ra,ba))}null!=I&&k(ra,I,H,S,p)}}finally{p.getModel().endUpdate()}null!=M&&(p.setSelectionCells(M),p.scrollCellToVisible(M[0]))}}},p.cellEditor.isContentEditing(),!p.cellEditor.isContentEditing(),!0,x)}}).isEnabled=F;this.addAction("crop...",function(){var d=p.getSelectionCell();if(p.isEnabled()&&
-!p.isCellLocked(p.getDefaultParent())&&null!=d){var f=p.getCurrentCellStyle(d),g=f[mxConstants.STYLE_IMAGE],x=f[mxConstants.STYLE_SHAPE];g&&"image"==x&&(f=new CropImageDialog(m,g,f[mxConstants.STYLE_CLIP_PATH],function(y,t,G){k(d,y,t,G,p)}),m.showDialog(f.container,300,390,!0,!0))}}).isEnabled=F;L=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");L.setToggleAction(!0);L.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));
-L=this.addAction("formatPanel",mxUtils.bind(this,function(){m.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");L.setToggleAction(!0);L.setSelectedCallback(mxUtils.bind(this,function(){return 0<m.formatWidth}));L=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");L.setToggleAction(!0);L.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var d=
-p.getSelectionCell();if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&null!=d){var f=new ConnectionPointsDialog(m,d);m.showDialog(f.container,350,450,!0,!1,function(){f.destroy()});f.init()}}).isEnabled=F};Actions.prototype.addAction=function(b,e,k,m,C){if("..."==b.substring(b.length-3)){b=b.substring(0,b.length-3);var p=mxResources.get(b)+"..."}else p=mxResources.get(b);return this.put(b,new Action(p,e,k,m,C))};Actions.prototype.put=function(b,e){return this.actions[b]=e};
-Actions.prototype.get=function(b){return this.actions[b]};function Action(b,e,k,m,C){mxEventSource.call(this);this.label=b;this.funct=this.createFunction(e);this.enabled=null!=k?k:!0;this.iconCls=m;this.shortcut=C;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(b){return b};Action.prototype.setEnabled=function(b){this.enabled!=b&&(this.enabled=b,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};
-Action.prototype.setToggleAction=function(b){this.toggleAction=b};Action.prototype.setSelectedCallback=function(b){this.selectedCallback=b};Action.prototype.isSelected=function(){return this.selectedCallback()};DrawioFile=function(b,e){mxEventSource.call(this);this.ui=b;this.setData(e||"");this.initialData=this.getData();this.created=(new Date).getTime();this.stats={opened:0,merged:0,fileMerged:0,fileReloaded:0,conflicts:0,timeouts:0,saved:0,closed:0,destroyed:0,joined:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;mxUtils.extend(DrawioFile,mxEventSource);
+Actions.prototype.init=function(){function b(G){p.escape();G=p.deleteCells(p.getDeletableCells(p.getSelectionCells()),G);null!=G&&p.setSelectionCells(G)}function d(){if(!p.isSelectionEmpty()){p.getModel().beginUpdate();try{for(var G=p.getSelectionCells(),M=0;M<G.length;M++)p.cellLabelChanged(G[M],"")}finally{p.getModel().endUpdate()}}}function g(G,M,Q,e,f){f.getModel().beginUpdate();try{var k=f.getCellGeometry(G);null!=k&&Q&&e&&(Q/=e,k=k.clone(),1<Q?k.height=k.width/Q:k.width=k.height*Q,f.getModel().setGeometry(G,
+k));f.setCellStyles(mxConstants.STYLE_CLIP_PATH,M,[G]);f.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[G])}finally{f.getModel().endUpdate()}}var l=this.editorUi,D=l.editor,p=D.graph,E=function(){return Action.prototype.isEnabled.apply(this,arguments)&&p.isEnabled()};this.addAction("new...",function(){p.openLink(l.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";l.openFile()});this.addAction("smartFit",function(){p.popupMenuHandler.hideMenu();var G=p.view.scale,
+M=p.view.translate.x,Q=p.view.translate.y;l.actions.get("resetView").funct();1E-5>Math.abs(G-p.view.scale)&&M==p.view.translate.x&&Q==p.view.translate.y&&l.actions.get(p.pageVisible?"fitPage":"fitWindow").funct()});this.addAction("keyPressEnter",function(){p.isEnabled()&&(p.isSelectionEmpty()?l.actions.get("smartFit").funct():p.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){l.hideDialog()}));
+window.openFile.setConsumer(mxUtils.bind(this,function(G,M){try{var Q=mxUtils.parseXml(G);D.graph.setSelectionCells(D.graph.importGraphModel(Q.documentElement))}catch(e){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+e.message)}}));l.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=E;this.addAction("save",function(){l.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=E;this.addAction("saveAs...",function(){l.saveFile(!0)},null,
+null,Editor.ctrlKey+"+Shift+S").isEnabled=E;this.addAction("export...",function(){l.showDialog((new ExportDialog(l)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var G=new EditDiagramDialog(l);l.showDialog(G.container,620,420,!0,!1);G.init()});this.addAction("pageSetup...",function(){l.showDialog((new PageSetupDialog(l)).container,320,240,!0,!0)}).isEnabled=E;this.addAction("print...",function(){l.showDialog((new PrintDialog(l)).container,300,180,!0,!0)},null,"sprite-print",
+Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(p,null,10,10)});this.addAction("undo",function(){l.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){l.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var G=null;try{G=l.copyXml(),null!=G&&p.removeCells(G,!1)}catch(M){}null==G&&mxClipboard.cut(p)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{l.copyXml()}catch(G){}try{mxClipboard.copy(p)}catch(G){l.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&&(l.readGraphModelFromClipboard(function(M){if(null!=M){p.getModel().beginUpdate();try{l.pasteXml(M,!0)}finally{p.getModel().endUpdate()}}else mxClipboard.paste(p)}),G=!0)}catch(M){}G||mxClipboard.paste(p)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(G){function M(e){if(null!=e){for(var f=!0,k=0;k<
+e.length&&f;k++)f=f&&p.model.isEdge(e[k]);var z=p.view.translate;k=p.view.scale;var t=z.x,B=z.y;z=null;if(1==e.length&&f){var I=p.getCellGeometry(e[0]);null!=I&&(z=I.getTerminalPoint(!0))}z=null!=z?z:p.getBoundingBoxFromGeometry(e,f);null!=z&&(f=Math.round(p.snap(p.popupMenuHandler.triggerX/k-t)),k=Math.round(p.snap(p.popupMenuHandler.triggerY/k-B)),p.cellsMoved(e,f-z.x,k-z.y))}}function Q(){p.getModel().beginUpdate();try{M(mxClipboard.paste(p))}finally{p.getModel().endUpdate()}}if(p.isEnabled()&&
+!p.isCellLocked(p.getDefaultParent())){G=!1;try{Editor.enableNativeCipboard&&(l.readGraphModelFromClipboard(function(e){if(null!=e){p.getModel().beginUpdate();try{M(l.pasteXml(e,!0))}finally{p.getModel().endUpdate()}}else Q()}),G=!0)}catch(e){}G||Q()}});this.addAction("copySize",function(){var G=p.getSelectionCell();p.isEnabled()&&null!=G&&p.getModel().isVertex(G)&&(G=p.getCellGeometry(G),null!=G&&(l.copiedSize=new mxRectangle(G.x,G.y,G.width,G.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",
+function(){if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=l.copiedSize){p.getModel().beginUpdate();try{for(var G=p.getResizableCells(p.getSelectionCells()),M=0;M<G.length;M++)if(p.getModel().isVertex(G[M])){var Q=p.getCellGeometry(G[M]);null!=Q&&(Q=Q.clone(),Q.width=l.copiedSize.width,Q.height=l.copiedSize.height,p.getModel().setGeometry(G[M],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)||(l.copiedValue=G))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(G,M){function Q(k,z){var t=e.getValue(k);z=k.cloneValue(z);z.removeAttribute("placeholders");null==t||isNaN(t.nodeType)||z.setAttribute("placeholders",t.getAttribute("placeholders"));null!=G&&mxEvent.isShiftDown(G)||z.setAttribute("label",p.convertValueToString(k));e.setValue(k,z)}G=null!=M?M:G;var e=p.getModel();if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=l.copiedValue){e.beginUpdate();
+try{var f=p.getEditableCells(p.getSelectionCells());if(0==f.length)Q(e.getRoot(),l.copiedValue);else for(M=0;M<f.length;M++)Q(f[M],l.copiedValue)}finally{e.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(G,M){G=null!=M?M:G;null!=G&&mxEvent.isShiftDown(G)?d():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(){d()},null,null,Editor.ctrlKey+
+"+Delete");this.addAction("duplicate",function(){try{p.setSelectionCells(p.duplicateCells()),p.scrollCellToVisible(p.getSelectionCell())}catch(G){l.handleError(G)}},null,null,Editor.ctrlKey+"+D");this.put("mergeCells",new Action(mxResources.get("merge"),function(){var G=l.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=l.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,M){G=null!=M?M: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(),M=p.getCurrentCellStyle(p.getSelectionCell()),Q=1==mxUtils.getValue(M,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("connectable",Q,G)}finally{p.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");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)});this.addAction("sendBackward",function(G){p.orderCells(!0,null,!0)});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 M=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]]),M.push(G[Q]))}finally{p.model.endUpdate()}0<
+M.length&&p.setSelectionCells(M)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(p.isEnabled()){var G=p.getSelectionCells();if(null!=G){for(var M=[],Q=0;Q<G.length;Q++)p.isTableRow(G[Q])||p.isTableCell(G[Q])||M.push(G[Q]);p.removeCellsFromParent(M)}}});this.addAction("edit",function(){p.isEnabled()&&p.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var G=p.getSelectionCell()||p.getModel().getRoot();l.showDataDialog(G)},null,
+null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var G=p.getSelectionCell();if(p.isEnabled()&&null!=G&&p.isCellEditable(G)){var M="";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&&(M=Q)}M=new TextareaDialog(l,mxResources.get("editTooltip")+":",M,function(e){p.setTooltipForCell(G,
+e)});l.showDialog(M.container,320,200,!0,!0);M.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 M=p.getLinkForCell(G)||"";l.showLinkDialog(M,mxResources.get("apply"),function(Q,e,f){Q=mxUtils.trim(Q);p.setLinkForCell(G,0<Q.length?Q:null);p.setAttributeForCell(G,"linkTarget",f)},!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(),l.actions.get("image").funct())})).isEnabled=E;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&l.showLinkDialog("",mxResources.get("insert"),function(G,M,Q){G=mxUtils.trim(G);if(0<G.length){var e=null,f=p.getLinkTitle(G);null!=M&&0<M.length&&(e=M[0].iconUrl,
+f=M[0].name||M[0].type,f=f.charAt(0).toUpperCase()+f.substring(1),30<f.length&&(f=f.substring(0,30)+"..."));M=new mxCell(f,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=e?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+e:"spacing=10;"));M.vertex=!0;e=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry([M],!0));M.geometry.x=e.x;M.geometry.y=e.y;p.setAttributeForCell(M,"linkTarget",Q);p.setLinkForCell(M,G);p.cellSizeUpdated(M,
+!0);p.getModel().beginUpdate();try{M=p.addCell(M),p.fireEvent(new mxEventObject("cellsInserted","cells",[M]))}finally{p.getModel().endUpdate()}p.setSelectionCell(M);p.scrollCellToVisible(p.getSelectionCell())}},!0)})).isEnabled=E;this.addAction("link...",mxUtils.bind(this,function(){if(p.isEnabled())if(p.cellEditor.isContentEditing()){var G=p.getSelectedElement(),M=p.getParentByName(G,"A",p.cellEditor.textarea),Q="";if(null==M&&null!=G&&null!=G.getElementsByTagName)for(var e=G.getElementsByTagName("a"),
+f=0;f<e.length&&null==M;f++)e[f].textContent==G.textContent&&(M=e[f]);null!=M&&"A"==M.nodeName&&(Q=M.getAttribute("href")||"",p.selectNode(M));var k=p.cellEditor.saveSelection();l.showLinkDialog(Q,mxResources.get("apply"),mxUtils.bind(this,function(z){p.cellEditor.restoreSelection(k);null!=z&&p.insertLink(z)}))}else p.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=E;this.addAction("autosize",function(){var G=p.getSelectionCells();if(null!=G){p.getModel().beginUpdate();
+try{for(var M=0;M<G.length;M++){var Q=G[M];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 M=
+p.getEditableCells(p.getSelectionCells()),Q=0;Q<M.length;Q++)if(state=p.getView().getState(M[Q]),null!=state){var e=mxUtils.getValue(state.style,"html","0");if("1"==e&&null==G){var f=p.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(f=f.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var k=document.createElement("div");k.innerHTML=p.sanitizeHtml(f);f=mxUtils.extractTextWithWhitespace(k.childNodes);p.cellLabelChanged(state.cell,f);p.setCellStyles("html",G,[M[Q]])}else"0"==
+e&&"1"==G&&(f=mxUtils.htmlEntities(p.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(f=f.replace(/\n/g,"<br/>")),p.cellLabelChanged(state.cell,p.sanitizeHtml(f)),p.setCellStyles("html",G,[M[Q]]))}l.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=G?G:"0"],"cells",M))}finally{p.getModel().endUpdate()}});this.addAction("wordWrap",function(){var G=p.getView().getState(p.getSelectionCell()),M="wrap";p.stopEditing();null!=G&&"wrap"==G.style[mxConstants.STYLE_WHITE_SPACE]&&
+(M=null);p.setCellStyles(mxConstants.STYLE_WHITE_SPACE,M)});this.addAction("rotation",function(){var G="0",M=p.getView().getState(p.getSelectionCell());null!=M&&(G=M.style[mxConstants.STYLE_ROTATION]||G);G=new FilenameDialog(l,G,mxResources.get("apply"),function(Q){null!=Q&&0<Q.length&&p.setCellStyles(mxConstants.STYLE_ROTATION,Q)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");l.showDialog(G.container,375,80,!0,!0);G.init()});this.addAction("resetView",function(){p.zoomTo(1);
+l.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",function(G){p.isFastZoomEnabled()?p.lazyZoom(!0,!0,l.buttonZoomDelay):p.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(G){p.isFastZoomEnabled()?p.lazyZoom(!1,!0,l.buttonZoomDelay):p.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var G=p.isSelectionEmpty()?p.getGraphBounds():p.getBoundingBox(p.getSelectionCells()),M=p.view.translate,
+Q=p.view.scale;G.x=G.x/Q-M.x;G.y=G.y/Q-M.y;G.width/=Q;G.height/=Q;null!=p.backgroundImage&&(G=mxRectangle.fromRectangle(G),G.add(new mxRectangle(0,0,p.backgroundImage.width,p.backgroundImage.height)));0==G.width||0==G.height?(p.zoomTo(1),l.resetScrollbars()):(M=Editor.fitWindowBorders,null!=M&&(G.x-=M.x,G.y-=M.y,G.width+=M.width+M.x,G.height+=M.height+M.y),p.fitWindow(G))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){p.pageVisible||this.get("pageView").funct();
+var G=p.pageFormat,M=p.pageScale;p.zoomTo(Math.floor(20*Math.min((p.container.clientWidth-10)/G.width/M,(p.container.clientHeight-10)/G.height/M))/20);mxUtils.hasScrollbars(p.container)&&(G=p.getPagePadding(),p.container.scrollTop=G.y*p.view.scale-1,p.container.scrollLeft=Math.min(G.x*p.view.scale,(p.container.scrollWidth-p.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){p.pageVisible||this.get("pageView").funct();var G=p.pageFormat,
+M=p.pageScale;p.zoomTo(Math.floor(20*Math.min((p.container.clientWidth-10)/(2*G.width)/M,(p.container.clientHeight-10)/G.height/M))/20);mxUtils.hasScrollbars(p.container)&&(G=p.getPagePadding(),p.container.scrollTop=Math.min(G.y,(p.container.scrollHeight-p.container.clientHeight)/2),p.container.scrollLeft=Math.min(G.x,(p.container.scrollWidth-p.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){p.pageVisible||this.get("pageView").funct();
+p.zoomTo(Math.floor(20*(p.container.clientWidth-10)/p.pageFormat.width/p.pageScale)/20);if(mxUtils.hasScrollbars(p.container)){var G=p.getPagePadding();p.container.scrollLeft=Math.min(G.x*p.view.scale,(p.container.scrollWidth-p.container.clientWidth)/2)}}));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(M){M=parseInt(M);!isNaN(M)&&
+0<M&&p.zoomTo(M/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(M){M=parseInt(M);!isNaN(M)&&0<M&&(M=new ChangePageSetup(l,null,null,null,M/100),M.ignoreColor=!0,M.ignoreImage=!0,p.model.execute(M))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(G.container,
+300,80,!0,!0);G.init()}));var N=null;N=this.addAction("grid",function(){p.setGridEnabled(!p.isGridEnabled());p.defaultGridEnabled=p.isGridEnabled();l.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");N.setToggleAction(!0);N.setSelectedCallback(function(){return p.isGridEnabled()});N.setEnabled(!1);N=this.addAction("guides",function(){p.graphHandler.guidesEnabled=!p.graphHandler.guidesEnabled;l.fireEvent(new mxEventObject("guidesEnabledChanged"))});N.setToggleAction(!0);
+N.setSelectedCallback(function(){return p.graphHandler.guidesEnabled});N.setEnabled(!1);N=this.addAction("tooltips",function(){p.tooltipHandler.setEnabled(!p.tooltipHandler.isEnabled());l.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});N.setToggleAction(!0);N.setSelectedCallback(function(){return p.tooltipHandler.isEnabled()});N=this.addAction("collapseExpand",function(){var G=new ChangePageSetup(l);G.ignoreColor=!0;G.ignoreImage=!0;G.foldingEnabled=!p.foldingEnabled;p.model.execute(G)});
+N.setToggleAction(!0);N.setSelectedCallback(function(){return p.foldingEnabled});N.isEnabled=E;N=this.addAction("scrollbars",function(){l.setScrollbars(!l.hasScrollbars())});N.setToggleAction(!0);N.setSelectedCallback(function(){return p.scrollbars});N=this.addAction("pageView",mxUtils.bind(this,function(){l.setPageVisible(!p.pageVisible)}));N.setToggleAction(!0);N.setSelectedCallback(function(){return p.pageVisible});N=this.addAction("connectionArrows",function(){p.connectionArrowsEnabled=!p.connectionArrowsEnabled;
+l.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");N.setToggleAction(!0);N.setSelectedCallback(function(){return p.connectionArrowsEnabled});N=this.addAction("connectionPoints",function(){p.setConnectable(!p.connectionHandler.isEnabled());l.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");N.setToggleAction(!0);N.setSelectedCallback(function(){return p.connectionHandler.isEnabled()});N=this.addAction("copyConnect",function(){p.connectionHandler.setCreateTarget(!p.connectionHandler.isCreateTarget());
+l.fireEvent(new mxEventObject("copyConnectChanged"))});N.setToggleAction(!0);N.setSelectedCallback(function(){return p.connectionHandler.isCreateTarget()});N.isEnabled=E;N=this.addAction("autosave",function(){l.editor.setAutosave(!l.editor.autosave)});N.setToggleAction(!0);N.setSelectedCallback(function(){return l.editor.autosave});N.isEnabled=E;N.visible=!1;this.addAction("help",function(){var G="";mxResources.isLanguageSupported(mxClient.language)&&(G="_"+mxClient.language);p.openLink(RESOURCES_PATH+
+"/help"+G+".html")});var R=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){R||(l.showDialog((new AboutDialog(l)).container,320,280,!0,!0,function(){R=!1}),R=!0)}));N=mxUtils.bind(this,function(G,M,Q,e){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,M,f);(M&mxConstants.FONT_BOLD)==
+mxConstants.FONT_BOLD?p.updateLabelElements(f,function(z){z.style.fontWeight=null;"B"==z.nodeName&&p.replaceElement(z)}):(M&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?p.updateLabelElements(f,function(z){z.style.fontStyle=null;"I"==z.nodeName&&p.replaceElement(z)}):(M&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&p.updateLabelElements(f,function(z){z.style.textDecoration=null;"U"==z.nodeName&&p.replaceElement(z)});for(var k=0;k<f.length;k++)0==p.model.getChildCount(f[k])&&p.autoSizeCell(f[k],
+!1)}finally{p.getModel().endUpdate()}}},null,null,e)});N("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");N("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");N("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){l.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",
+function(){l.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){l.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){l.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});this.addAction("backgroundColor...",function(){l.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){l.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});this.addAction("vertical",function(){l.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,
+!0)});this.addAction("shadow",function(){l.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_DASHED,null),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),l.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("dashed",function(){p.getModel().beginUpdate();
+try{p.setCellStyles(mxConstants.STYLE_DASHED,"1"),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),l.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("dotted",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_DASHED,"1"),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),l.fireEvent(new mxEventObject("styleChanged",
+"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"),l.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"),l.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(),M=p.getCurrentCellStyle(G[0]),
+Q="1"==mxUtils.getValue(M,mxConstants.STYLE_ROUNDED,"0")?"0":"1";p.setCellStyles(mxConstants.STYLE_ROUNDED,Q);p.setCellStyles(mxConstants.STYLE_CURVED,null);l.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[Q,"0"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}}});this.addAction("curved",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),p.setCellStyles(mxConstants.STYLE_CURVED,
+"1"),l.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("collapsible",function(){var G=p.view.getState(p.getSelectionCell()),M="1";null!=G&&null!=p.getFoldingImage(G)&&(M="0");p.setCellStyles("collapsible",M);l.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[M],"cells",p.getSelectionCells()))});this.addAction("editStyle...",
+mxUtils.bind(this,function(){var G=p.getEditableCells(p.getSelectionCells());if(null!=G&&0<G.length){var M=p.getModel();M=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",M.getStyle(G[0])||"",function(Q){null!=Q&&p.setCellStyle(mxUtils.trim(Q),G)},null,null,400,220);this.editorUi.showDialog(M.container,420,300,!0,!0);M.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){p.isEnabled()&&!p.isSelectionEmpty()&&l.setDefaultStyle(p.getSelectionCell())},
+null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){p.isEnabled()&&l.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var G=p.getSelectionCell();if(null!=G&&p.getModel().isEdge(G)){var M=D.graph.selectionCellsHandler.getHandler(G);if(M instanceof mxEdgeHandler){var Q=p.view.translate,e=p.view.scale,f=Q.x;Q=Q.y;G=p.getModel().getParent(G);for(var k=p.getCellGeometry(G);p.getModel().isVertex(G)&&null!=k;)f+=k.x,Q+=k.y,G=
+p.getModel().getParent(G),k=p.getCellGeometry(G);f=Math.round(p.snap(p.popupMenuHandler.triggerX/e-f));e=Math.round(p.snap(p.popupMenuHandler.triggerY/e-Q));M.addPointAt(M.state,f,e)}}});this.addAction("removeWaypoint",function(){var G=l.actions.get("removeWaypoint");null!=G.handler&&G.handler.removePoint(G.handler.state,G.index)});this.addAction("clearWaypoints",function(G,M){G=null!=M?M:G;var Q=p.getSelectionCells();if(null!=Q){Q=p.getEditableCells(p.addAllEdges(Q));p.getModel().beginUpdate();try{for(var e=
+0;e<Q.length;e++){var f=Q[e];if(p.getModel().isEdge(f)){var k=p.getCellGeometry(f);null!=M&&mxEvent.isShiftDown(G)?(p.setCellStyles(mxConstants.STYLE_EXIT_X,null,[f]),p.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[f]),p.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[f]),p.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[f])):null!=k&&(k=k.clone(),k.points=null,k.x=0,k.y=0,k.offset=null,p.getModel().setGeometry(f,k))}}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+C");N=this.addAction("subscript",
+mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");N=this.addAction("superscript",mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var G=mxResources.get("image")+" ("+mxResources.get("url")+"):",M=p.getView().getState(p.getSelectionCell()),
+Q="",e=null;null!=M&&(Q=M.style[mxConstants.STYLE_IMAGE]||Q,e=M.style[mxConstants.STYLE_CLIP_PATH]||e);var f=p.cellEditor.saveSelection();l.showImageDialog(G,Q,function(k,z,t,B,I,O){if(p.cellEditor.isContentEditing())p.cellEditor.restoreSelection(f),p.insertImage(k,z,t);else{var J=p.getSelectionCells();if(null!=k&&(0<k.length||0<J.length)){var y=null;p.getModel().beginUpdate();try{if(0==J.length){J=[p.insertVertex(p.getDefaultParent(),null,"",0,0,z,t,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];
+var ia=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry(J,!0));J[0].geometry.x=ia.x;J[0].geometry.y=ia.y;null!=B&&g(J[0],B,I,O,p);y=J;p.fireEvent(new mxEventObject("cellsInserted","cells",y))}p.setCellStyles(mxConstants.STYLE_IMAGE,0<k.length?k:null,J);var da=p.getCurrentCellStyle(J[0]);"image"!=da[mxConstants.STYLE_SHAPE]&&"label"!=da[mxConstants.STYLE_SHAPE]?p.setCellStyles(mxConstants.STYLE_SHAPE,"image",J):0==k.length&&p.setCellStyles(mxConstants.STYLE_SHAPE,null,J);null==B&&p.setCellStyles(mxConstants.STYLE_CLIP_PATH,
+null,J);if(null!=z&&null!=t)for(k=0;k<J.length;k++){var ja=J[k];if("0"!=p.getCurrentCellStyle(ja).expand){var aa=p.getModel().getGeometry(ja);null!=aa&&(aa=aa.clone(),aa.width=z,aa.height=t,p.getModel().setGeometry(ja,aa))}null!=B&&g(ja,B,I,O,p)}}finally{p.getModel().endUpdate()}null!=y&&(p.setSelectionCells(y),p.scrollCellToVisible(y[0]))}}},p.cellEditor.isContentEditing(),!p.cellEditor.isContentEditing(),!0,e)}}).isEnabled=E;this.addAction("crop...",function(){var G=p.getSelectionCell();if(p.isEnabled()&&
+!p.isCellLocked(p.getDefaultParent())&&null!=G){var M=p.getCurrentCellStyle(G),Q=M[mxConstants.STYLE_IMAGE],e=M[mxConstants.STYLE_SHAPE];Q&&"image"==e&&(M=new CropImageDialog(l,Q,M[mxConstants.STYLE_CLIP_PATH],function(f,k,z){g(G,f,k,z,p)}),l.showDialog(M.container,300,390,!0,!0))}}).isEnabled=E;N=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(l,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",
+mxUtils.bind(this,function(){l.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",function(){l.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),l.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");N.setToggleAction(!0);N.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));
+N=this.addAction("format",mxUtils.bind(this,function(){l.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");N.setToggleAction(!0);N.setSelectedCallback(mxUtils.bind(this,function(){return l.isFormatPanelVisible()}));N=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(l,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){l.fireEvent(new mxEventObject("outline"))})),
+this.outlineWindow.window.addListener("hide",function(){l.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),l.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");N.setToggleAction(!0);N.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){var M=new ConnectionPointsDialog(l,G);l.showDialog(M.container,350,450,!0,!1,function(){M.destroy()});M.init()}}).isEnabled=E};Actions.prototype.addAction=function(b,d,g,l,D){if("..."==b.substring(b.length-3)){b=b.substring(0,b.length-3);var p=mxResources.get(b)+"..."}else p=mxResources.get(b);return this.put(b,new Action(p,d,g,l,D))};Actions.prototype.put=function(b,d){return this.actions[b]=d};
+Actions.prototype.get=function(b){return this.actions[b]};function Action(b,d,g,l,D){mxEventSource.call(this);this.label=b;this.funct=this.createFunction(d);this.enabled=null!=g?g:!0;this.iconCls=l;this.shortcut=D;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(b){return b};Action.prototype.setEnabled=function(b){this.enabled!=b&&(this.enabled=b,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};
+Action.prototype.setToggleAction=function(b){this.toggleAction=b};Action.prototype.setSelectedCallback=function(b){this.selectedCallback=b};Action.prototype.isSelected=function(){return this.selectedCallback()};DrawioFile=function(b,d){mxEventSource.call(this);this.ui=b;this.setData(d||"");this.initialData=this.getData();this.created=(new Date).getTime();this.stats={opened:0,merged:0,fileMerged:0,fileReloaded:0,conflicts:0,timeouts:0,saved:0,closed:0,destroyed:0,joined:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;mxUtils.extend(DrawioFile,mxEventSource);
DrawioFile.prototype.allChangesSavedKey="allChangesSaved";DrawioFile.prototype.savingSpinnerKey="saving";DrawioFile.prototype.savingStatusKey="saving";DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.optimisticSyncDelay=300;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.lastSaved=null;DrawioFile.prototype.lastChanged=null;DrawioFile.prototype.opened=null;DrawioFile.prototype.modified=!1;
DrawioFile.prototype.shadowModified=!1;DrawioFile.prototype.data=null;DrawioFile.prototype.shadowPages=null;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=3E5;DrawioFile.prototype.inConflictState=!1;DrawioFile.prototype.invalidChecksum=!1;DrawioFile.prototype.errorReportsEnabled=!1;DrawioFile.prototype.ageStart=null;DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0};
-DrawioFile.prototype.getShadowPages=function(){null==this.shadowPages&&(this.shadowPages=this.ui.getPagesForXml(this.initialData));return this.shadowPages};DrawioFile.prototype.setShadowPages=function(b){this.shadowPages=b};DrawioFile.prototype.synchronizeFile=function(b,e){this.savingFile?null!=e&&e({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,function(k){this.sync.cleanup(b,e,k)}),e):this.updateFile(b,e)};
-DrawioFile.prototype.updateFile=function(b,e,k,m){null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():this.getLatestVersion(mxUtils.bind(this,function(C){try{null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[C]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():null!=C?this.mergeFile(C,b,e,m):this.reloadFile(b,
-e))}catch(p){null!=e&&e(p)}}),e))};
-DrawioFile.prototype.mergeFile=function(b,e,k,m){var C=!0;try{this.stats.fileMerged++;var p=this.getShadowPages(),F=b.getShadowPages();if(null!=F&&0<F.length){var L=[this.ui.diffPages(null!=m?m:p,F)],P=this.ignorePatches(L);this.setShadowPages(F);if(P)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",P);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(p,this.ui.pages):null;m={};P={};var d=this.ui.patchPages(p,L[0]),f=this.ui.getHashValueForPages(d,
-m),g=this.ui.getHashValueForPages(F,P);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",p,"pages",this.ui.pages,"patches",L,"backup",this.backupPatch,"checksum",f,"current",g,"valid",f==g,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=f&&f!=g){var x=this.compressReportData(this.getAnonymizedXmlForPages(F)),y=this.compressReportData(this.getAnonymizedXmlForPages(d)),t=this.ui.hashValue(b.getCurrentEtag()),G=this.ui.hashValue(this.getCurrentEtag());
-this.checksumError(k,L,"Shadow Details: "+JSON.stringify(m)+"\nChecksum: "+f+"\nCurrent: "+g+"\nCurrent Details: "+JSON.stringify(P)+"\nFrom: "+t+"\nTo: "+G+"\n\nFile Data:\n"+x+"\nPatched Shadow:\n"+y,null,"mergeFile",f,g,b.getCurrentRevisionId());return}if(null!=this.sync){var D=this.sync.patchRealtime(L,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==D||mxUtils.isEmptyObject(D)||L.push(D)}this.patch(L,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw C=!1,Error(mxResources.get("notADiagramFile"));
-this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(S){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=k&&k(S);try{if(C)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,S);else{var I=this.getCurrentUser(),H=null!=I?I.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),H,S)}}catch(T){}}};
-DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var e=new mxCodec(mxUtils.createXmlDocument()),k=e.document.createElement("mxfile");if(null!=b)for(var m=0;m<b.length;m++){var C=e.encode(new mxGraphModel(b[m].root));"1"!=urlParams.dev&&(C=this.ui.anonymizeNode(C,!0));C.setAttribute("id",b[m].getId());b[m].viewState&&this.ui.editor.graph.saveViewState(b[m].viewState,C,!0);k.appendChild(C)}return mxUtils.getPrettyXml(k)};
-DrawioFile.prototype.compressReportData=function(b,e,k){e=null!=e?e:1E4;null!=k&&null!=b&&b.length>k?b=b.substring(0,k)+"[...]":null!=b&&b.length>e&&(b=Graph.compress(b)+"\n");return b};
-DrawioFile.prototype.checksumError=function(b,e,k,m,C,p,F,L){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=e)for(var P=0;P<e.length;P++)this.ui.anonymizePatch(e[P]);var d=mxUtils.bind(this,function(G){var D=this.compressReportData(JSON.stringify(e,null,2));G=null==G?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(G.data)),
-25E3);this.sendErrorReport("Checksum Error in "+C+" "+this.getHash(),(null!=k?k:"")+"\n\nPatches:\n"+D+(null!=G?"\n\nRemote:\n"+G:""),null,7E4)});null==m?d(null):this.getLatestVersion(mxUtils.bind(this,function(G){null!=G&&G.getCurrentEtag()==m?d(G):d(null)}),function(){})}else{var f=this.getCurrentUser(),g=null!=f?f.id:"unknown",x=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",y=JSON.stringify(e).length,t=null;if(null!=e&&this.constructor==DriveFile&&400>y){for(P=0;P<e.length;P++)this.ui.anonymizePatch(e[P]);
-t=JSON.stringify(e);t=null!=t&&250>t.length?Graph.compress(t):null}this.getLatestVersion(mxUtils.bind(this,function(G){try{var D=null!=t?"Report":"Error",I=this.ui.getHashValueForPages(G.getShadowPages());EditorUi.logError("Checksum "+D+" in "+C+" "+x,null,this.getMode()+"."+this.getId(),"user_"+g+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+y+"-patches_"+e.length+(null!=t?"-json_"+t:"")+"-size_"+this.getSize()+(null!=p?"-expected_"+p:"")+(null!=F?"-current_"+F:"")+(null!=L?
-"-rev_"+this.ui.hashValue(L):"")+(null!=I?"-latest_"+I:"")+(null!=G?"-latestRev_"+this.ui.hashValue(G.getCurrentRevisionId()):""));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+x,action:C,label:"user_"+g+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+y+"-patches_"+e.length+"-size_"+this.getSize()})}catch(H){}}),b)}}catch(G){}};
-DrawioFile.prototype.sendErrorReport=function(b,e,k,m){try{var C=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),p=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),F=this.getCurrentUser(),L=null!=F?this.ui.hashValue(F.id):"unknown",P=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",d=this.getTitle(),f=d.lastIndexOf(".");F="xml";0<f&&(F=d.substring(f));var g=null!=k?k.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
-":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+F+")\nUser="+L+P+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=e?"\n\n"+e:
-"")+(null!=k?"\n\nError: "+k.message:"")+"\n\nStack:\n"+g+"\n\nShadow:\n"+C+"\n\nData:\n"+p,m)}catch(x){}};
-DrawioFile.prototype.reloadFile=function(b,e){try{this.ui.spinner.stop();var k=mxUtils.bind(this,function(){EditorUi.debug("DrawioFile.reloadFile",[this],"hash",this.getHash(),"modified",this.isModified(),"backupPatch",this.backupPatch);this.stats.fileReloaded++;if(""==this.getHash())this.mergeLatestVersion(null!=this.backupPatch?[this.backupPatch]:null,mxUtils.bind(this,function(){this.backupPatch=null;null!=b&&b()}),e);else{var m=this.ui.editor.graph,C=m.getSelectionCells(),p=m.getViewState(),F=
-this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(F,p,C);null!=this.backupPatch&&this.patch([this.backupPatch]);var L=this.ui.getCurrentFile();null!=L&&(L.stats=this.stats);null!=b&&b()}}),!0)}});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),k,mxResources.get("cancel"),mxResources.get("discardChanges")):
-k()}catch(m){null!=e&&e(m)}};DrawioFile.prototype.mergeLatestVersion=function(b,e,k){this.getLatestVersion(mxUtils.bind(this,function(m){this.ui.editor.graph.model.beginUpdate();try{this.ui.replaceFileData(m.getData()),null!=b&&this.patch(b)}finally{this.ui.editor.graph.model.endUpdate()}this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(m.getDescriptor());this.descriptorChanged();null!=e&&e()}),k)};
-DrawioFile.prototype.copyFile=function(b,e){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var e=!0;if(null!=b)for(var k=0;k<b.length&&e;k++)e=e&&mxUtils.isEmptyObject(b[k]);return e};
-DrawioFile.prototype.patch=function(b,e,k){if(null!=b){var m=this.ui.editor.undoManager,C=m.history.slice(),p=m.indexOfNextAdd,F=this.ui.editor.graph;F.container.style.visibility="hidden";var L=this.changeListenerEnabled;this.changeListenerEnabled=k;var P=F.foldingEnabled,d=F.mathEnabled,f=F.cellRenderer.redraw;F.cellRenderer.redraw=function(g){g.view.graph.isEditing(g.cell)&&(g.view.graph.scrollCellToVisible(g.cell),g.view.graph.cellEditor.resize());f.apply(this,arguments)};F.model.beginUpdate();
-try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{F.container.style.visibility="";F.model.endUpdate();F.cellRenderer.redraw=f;this.changeListenerEnabled=L;k||(m.history=C,m.indexOfNextAdd=p,m.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)d!=F.mathEnabled?
-(this.ui.editor.updateGraphComponents(),F.refresh()):(P!=F.foldingEnabled?F.view.revalidate():F.view.validate(),F.sizeDidChange());null!=this.sync&&this.isRealtime()&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",e,"undoable",k)}return b};
-DrawioFile.prototype.save=function(b,e,k,m,C,p){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",m,"overwrite",C,"manual",p,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!C&&this.invalidChecksum)if(null!=k)k({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=e&&e();else if(null!=k)k({message:mxResources.get("readOnly")});
-else throw Error(mxResources.get("readOnly"));}catch(F){if(null!=k)k(F);else throw F;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var e=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=e&&(e.viewState=this.ui.editor.graph.getViewState(),e.needsUpdate=!0)}e=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return e};
-DrawioFile.prototype.updateFileData=function(){null!=this.sync&&this.sync.sendLocalChanges();this.setData(this.createData());null!=this.sync&&this.sync.fileDataUpdated()};DrawioFile.prototype.isCompressedStorage=function(){return!0};DrawioFile.prototype.isCompressed=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=b?"false"!=b:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(b,e,k){};
-DrawioFile.prototype.saveFile=function(b,e,k,m){};DrawioFile.prototype.getPublicUrl=function(b){b(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.getShadowModified=function(){return this.shadowModified};DrawioFile.prototype.setShadowModified=function(b){this.shadowModified=b};DrawioFile.prototype.setModified=function(b){this.shadowModified=this.modified=b};DrawioFile.prototype.isAutosaveOptional=function(){return!1};
-DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(b,e,k){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(b,e,k){};DrawioFile.prototype.share=function(){this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""};
+DrawioFile.prototype.getShadowPages=function(){null==this.shadowPages&&(this.shadowPages=this.ui.getPagesForXml(this.initialData));return this.shadowPages};DrawioFile.prototype.setShadowPages=function(b){this.shadowPages=b};DrawioFile.prototype.synchronizeFile=function(b,d){this.savingFile?null!=d&&d({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,function(g){this.sync.cleanup(b,d,g)}),d):this.updateFile(b,d)};
+DrawioFile.prototype.updateFile=function(b,d,g,l){null!=g&&g()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=d&&d():this.getLatestVersion(mxUtils.bind(this,function(D){try{null!=g&&g()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[D]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=d&&d():null!=D?this.mergeFile(D,b,d,l):this.reloadFile(b,
+d))}catch(p){null!=d&&d(p)}}),d))};
+DrawioFile.prototype.mergeFile=function(b,d,g,l){var D=!0;try{this.stats.fileMerged++;var p=this.getShadowPages(),E=b.getShadowPages();if(null!=E&&0<E.length){var N=[this.ui.diffPages(null!=l?l:p,E)],R=this.ignorePatches(N);this.setShadowPages(E);if(R)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",R);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(p,this.ui.pages):null;l={};R={};var G=this.ui.patchPages(p,N[0]),M=this.ui.getHashValueForPages(G,
+l),Q=this.ui.getHashValueForPages(E,R);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",p,"pages",this.ui.pages,"patches",N,"backup",this.backupPatch,"checksum",M,"current",Q,"valid",M==Q,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=M&&M!=Q){var e=this.compressReportData(this.getAnonymizedXmlForPages(E)),f=this.compressReportData(this.getAnonymizedXmlForPages(G)),k=this.ui.hashValue(b.getCurrentEtag()),z=this.ui.hashValue(this.getCurrentEtag());
+this.checksumError(g,N,"Shadow Details: "+JSON.stringify(l)+"\nChecksum: "+M+"\nCurrent: "+Q+"\nCurrent Details: "+JSON.stringify(R)+"\nFrom: "+k+"\nTo: "+z+"\n\nFile Data:\n"+e+"\nPatched Shadow:\n"+f,null,"mergeFile",M,Q,b.getCurrentRevisionId());return}if(null!=this.sync){var t=this.sync.patchRealtime(N,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==t||mxUtils.isEmptyObject(t)||N.push(t)}this.patch(N,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw D=!1,Error(mxResources.get("notADiagramFile"));
+this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=d&&d()}catch(O){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=g&&g(O);try{if(D)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,O);else{var B=this.getCurrentUser(),I=null!=B?B.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),I,O)}}catch(J){}}};
+DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var d=new mxCodec(mxUtils.createXmlDocument()),g=d.document.createElement("mxfile");if(null!=b)for(var l=0;l<b.length;l++){var D=d.encode(new mxGraphModel(b[l].root));"1"!=urlParams.dev&&(D=this.ui.anonymizeNode(D,!0));D.setAttribute("id",b[l].getId());b[l].viewState&&this.ui.editor.graph.saveViewState(b[l].viewState,D,!0);g.appendChild(D)}return mxUtils.getPrettyXml(g)};
+DrawioFile.prototype.compressReportData=function(b,d,g){d=null!=d?d:1E4;null!=g&&null!=b&&b.length>g?b=b.substring(0,g)+"[...]":null!=b&&b.length>d&&(b=Graph.compress(b)+"\n");return b};
+DrawioFile.prototype.checksumError=function(b,d,g,l,D,p,E,N){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=d)for(var R=0;R<d.length;R++)this.ui.anonymizePatch(d[R]);var G=mxUtils.bind(this,function(z){var t=this.compressReportData(JSON.stringify(d,null,2));z=null==z?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(z.data)),
+25E3);this.sendErrorReport("Checksum Error in "+D+" "+this.getHash(),(null!=g?g:"")+"\n\nPatches:\n"+t+(null!=z?"\n\nRemote:\n"+z:""),null,7E4)});null==l?G(null):this.getLatestVersion(mxUtils.bind(this,function(z){null!=z&&z.getCurrentEtag()==l?G(z):G(null)}),function(){})}else{var M=this.getCurrentUser(),Q=null!=M?M.id:"unknown",e=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",f=JSON.stringify(d).length,k=null;if(null!=d&&this.constructor==DriveFile&&400>f){for(R=0;R<d.length;R++)this.ui.anonymizePatch(d[R]);
+k=JSON.stringify(d);k=null!=k&&250>k.length?Graph.compress(k):null}this.getLatestVersion(mxUtils.bind(this,function(z){try{var t=null!=k?"Report":"Error",B=this.ui.getHashValueForPages(z.getShadowPages());EditorUi.logError("Checksum "+t+" in "+D+" "+e,null,this.getMode()+"."+this.getId(),"user_"+Q+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+f+"-patches_"+d.length+(null!=k?"-json_"+k:"")+"-size_"+this.getSize()+(null!=p?"-expected_"+p:"")+(null!=E?"-current_"+E:"")+(null!=N?
+"-rev_"+this.ui.hashValue(N):"")+(null!=B?"-latest_"+B:"")+(null!=z?"-latestRev_"+this.ui.hashValue(z.getCurrentRevisionId()):""));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+e,action:D,label:"user_"+Q+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+f+"-patches_"+d.length+"-size_"+this.getSize()})}catch(I){}}),b)}}catch(z){}};
+DrawioFile.prototype.sendErrorReport=function(b,d,g,l){try{var D=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),p=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),E=this.getCurrentUser(),N=null!=E?this.ui.hashValue(E.id):"unknown",R=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",G=this.getTitle(),M=G.lastIndexOf(".");E="xml";0<M&&(E=G.substring(M));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()+" ("+E+")\nUser="+N+R+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=d?"\n\n"+d:
+"")+(null!=g?"\n\nError: "+g.message:"")+"\n\nStack:\n"+Q+"\n\nShadow:\n"+D+"\n\nData:\n"+p,l)}catch(e){}};
+DrawioFile.prototype.reloadFile=function(b,d){try{this.ui.spinner.stop();var g=mxUtils.bind(this,function(){EditorUi.debug("DrawioFile.reloadFile",[this],"hash",this.getHash(),"modified",this.isModified(),"backupPatch",this.backupPatch);this.stats.fileReloaded++;if(""==this.getHash())this.mergeLatestVersion(null!=this.backupPatch?[this.backupPatch]:null,mxUtils.bind(this,function(){this.backupPatch=null;null!=b&&b()}),d);else{var l=this.ui.editor.graph,D=l.getSelectionCells(),p=l.getViewState(),E=
+this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(E,p,D);null!=this.backupPatch&&this.patch([this.backupPatch]);var N=this.ui.getCurrentFile();null!=N&&(N.stats=this.stats);null!=b&&b()}}),!0)}});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),g,mxResources.get("cancel"),mxResources.get("discardChanges")):
+g()}catch(l){null!=d&&d(l)}};DrawioFile.prototype.mergeLatestVersion=function(b,d,g){this.getLatestVersion(mxUtils.bind(this,function(l){this.ui.editor.graph.model.beginUpdate();try{this.ui.replaceFileData(l.getData()),null!=b&&this.patch(b)}finally{this.ui.editor.graph.model.endUpdate()}this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(l.getDescriptor());this.descriptorChanged();null!=d&&d()}),g)};
+DrawioFile.prototype.copyFile=function(b,d){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var d=!0;if(null!=b)for(var g=0;g<b.length&&d;g++)d=d&&mxUtils.isEmptyObject(b[g]);return d};
+DrawioFile.prototype.patch=function(b,d,g){if(null!=b){var l=this.ui.editor.undoManager,D=l.history.slice(),p=l.indexOfNextAdd,E=this.ui.editor.graph;E.container.style.visibility="hidden";var N=this.changeListenerEnabled;this.changeListenerEnabled=g;var R=E.foldingEnabled,G=E.mathEnabled,M=E.cellRenderer.redraw;E.cellRenderer.redraw=function(Q){Q.view.graph.isEditing(Q.cell)&&(Q.view.graph.scrollCellToVisible(Q.cell),Q.view.graph.cellEditor.resize());M.apply(this,arguments)};E.model.beginUpdate();
+try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,d,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{E.container.style.visibility="";E.model.endUpdate();E.cellRenderer.redraw=M;this.changeListenerEnabled=N;g||(l.history=D,l.indexOfNextAdd=p,l.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)G!=E.mathEnabled?
+(this.ui.editor.updateGraphComponents(),E.refresh()):(R!=E.foldingEnabled?E.view.revalidate():E.view.validate(),E.sizeDidChange());null!=this.sync&&this.isRealtime()&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",d,"undoable",g)}return b};
+DrawioFile.prototype.save=function(b,d,g,l,D,p){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",l,"overwrite",D,"manual",p,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!D&&this.invalidChecksum)if(null!=g)g({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=d&&d();else if(null!=g)g({message:mxResources.get("readOnly")});
+else throw Error(mxResources.get("readOnly"));}catch(E){if(null!=g)g(E);else throw E;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var d=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=d&&(d.viewState=this.ui.editor.graph.getViewState(),d.needsUpdate=!0)}d=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return d};
+DrawioFile.prototype.updateFileData=function(){null!=this.sync&&this.sync.sendLocalChanges();this.setData(this.createData());null!=this.sync&&this.sync.fileDataUpdated()};DrawioFile.prototype.isCompressedStorage=function(){return!0};DrawioFile.prototype.isCompressed=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=b?"false"!=b:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(b,d,g){};
+DrawioFile.prototype.saveFile=function(b,d,g,l){};DrawioFile.prototype.getPublicUrl=function(b){b(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.getShadowModified=function(){return this.shadowModified};DrawioFile.prototype.setShadowModified=function(b){this.shadowModified=b};DrawioFile.prototype.setModified=function(b){this.shadowModified=this.modified=b};DrawioFile.prototype.isAutosaveOptional=function(){return!1};
+DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(b,d,g){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(b,d,g){};DrawioFile.prototype.share=function(){this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""};
DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.isChromelessView()||this.ui.editor.editable};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};DrawioFile.prototype.setData=function(b){this.data=b;EditorUi.debug("DrawioFile.setData",[this],"data",[b])};DrawioFile.prototype.getData=function(){return this.data};
-DrawioFile.prototype.open=function(){this.stats.opened++;var b=this.getData();if(null!=b){var e=function(k){for(var m=0;null!=k&&m<k.length;m++){var C=k[m];null!=C.id&&0==C.id.indexOf("extFont_")&&C.parentNode.removeChild(C)}};e(document.querySelectorAll("head > style[id]"));e(document.querySelectorAll("head > link[id]"));this.ui.setFileData(b);this.isModified()||this.setShadowPages(this.ui.clonePages(this.ui.pages))}this.installListeners();this.isSyncSupported()&&this.startSync()};
+DrawioFile.prototype.open=function(){this.stats.opened++;var b=this.getData();if(null!=b){var d=function(g){for(var l=0;null!=g&&l<g.length;l++){var D=g[l];null!=D.id&&0==D.id.indexOf("extFont_")&&D.parentNode.removeChild(D)}};d(document.querySelectorAll("head > style[id]"));d(document.querySelectorAll("head > link[id]"));this.ui.setFileData(b);this.isModified()||this.setShadowPages(this.ui.clonePages(this.ui.pages))}this.installListeners();this.isSyncSupported()&&this.startSync()};
DrawioFile.prototype.isSyncSupported=function(){return!1};DrawioFile.prototype.isRealtime=function(){return null!=this.ownPages};DrawioFile.prototype.isRealtimeSupported=function(){return!1};DrawioFile.prototype.isRealtimeEnabled=function(){return Editor.enableRealtime&&"0"!=urlParams["fast-sync"]};DrawioFile.prototype.setRealtimeEnabled=function(){};DrawioFile.prototype.isRealtimeOptional=function(){return!1};
-DrawioFile.prototype.getRealtimeState=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getState():3};DrawioFile.prototype.getRealtimeError=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getLastError():null};DrawioFile.prototype.isOptimisticSync=function(){return!1};DrawioFile.prototype.isRevisionHistorySupported=function(){return!1};DrawioFile.prototype.getRevisions=function(b,e){b(null)};
-DrawioFile.prototype.loadDescriptor=function(b,e){b(null)};DrawioFile.prototype.loadPatchDescriptor=function(b,e){this.loadDescriptor(mxUtils.bind(this,function(k){b(k)}),e)};DrawioFile.prototype.patchDescriptor=function(b,e){this.setDescriptorEtag(b,this.getDescriptorEtag(e));this.descriptorChanged()};
+DrawioFile.prototype.getRealtimeState=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getState():3};DrawioFile.prototype.getRealtimeError=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getLastError():null};DrawioFile.prototype.isOptimisticSync=function(){return!1};DrawioFile.prototype.isRevisionHistorySupported=function(){return!1};DrawioFile.prototype.getRevisions=function(b,d){b(null)};
+DrawioFile.prototype.loadDescriptor=function(b,d){b(null)};DrawioFile.prototype.loadPatchDescriptor=function(b,d){this.loadDescriptor(mxUtils.bind(this,function(g){b(g)}),d)};DrawioFile.prototype.patchDescriptor=function(b,d){this.setDescriptorEtag(b,this.getDescriptorEtag(d));this.descriptorChanged()};
DrawioFile.prototype.startSync=function(){"auto"!=DrawioFile.SYNC&&"fast"!=DrawioFile.SYNC||"1"==urlParams.stealth||"1"!=urlParams.rt&&this.ui.editor.chromeless&&!this.ui.editor.editable||(null==this.sync&&(this.sync=new DrawioFileSync(this)),this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.ui.fireEvent(new mxEventObject("realtimeStateChanged"))})),this.sync.start())};DrawioFile.prototype.isConflict=function(){return!1};
-DrawioFile.prototype.getChannelId=function(){return Graph.compress(this.getHash()).replace(/[\/ +]/g,"_")};DrawioFile.prototype.getChannelKey=function(b){return null};DrawioFile.prototype.getCurrentUser=function(){return null};DrawioFile.prototype.getLatestVersion=function(b,e){b(null)};DrawioFile.prototype.getLastModifiedDate=function(){return new Date};DrawioFile.prototype.setCurrentRevisionId=function(b){this.setDescriptorRevisionId(this.getDescriptor(),b)};
-DrawioFile.prototype.getCurrentRevisionId=function(){return this.getDescriptorRevisionId(this.getDescriptor())};DrawioFile.prototype.setCurrentEtag=function(b){this.setDescriptorEtag(this.getDescriptor(),b)};DrawioFile.prototype.getCurrentEtag=function(){return this.getDescriptorEtag(this.getDescriptor())};DrawioFile.prototype.getDescriptor=function(){return null};DrawioFile.prototype.setDescriptor=function(){};DrawioFile.prototype.setDescriptorRevisionId=function(b,e){this.setDescriptorEtag(b,e)};
-DrawioFile.prototype.getDescriptorRevisionId=function(b){return this.getDescriptorEtag(b)};DrawioFile.prototype.setDescriptorEtag=function(b,e){};DrawioFile.prototype.getDescriptorEtag=function(b){return null};DrawioFile.prototype.getDescriptorSecret=function(b){return null};
-DrawioFile.prototype.installListeners=function(){null==this.changeListener&&(this.changeListener=mxUtils.bind(this,function(b,e){b=null!=e?e.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=b&&b.ignoreEdit||this.fileChanged()}),this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener),this.ui.editor.graph.addListener("gridSizeChanged",this.changeListener),this.ui.editor.graph.addListener("shadowVisibleChanged",this.changeListener),this.ui.addListener("pageFormatChanged",
+DrawioFile.prototype.getChannelId=function(){return Graph.compress(this.getHash()).replace(/[\/ +]/g,"_")};DrawioFile.prototype.getChannelKey=function(b){return null};DrawioFile.prototype.getCurrentUser=function(){return null};DrawioFile.prototype.getLatestVersion=function(b,d){b(null)};DrawioFile.prototype.getLastModifiedDate=function(){return new Date};DrawioFile.prototype.setCurrentRevisionId=function(b){this.setDescriptorRevisionId(this.getDescriptor(),b)};
+DrawioFile.prototype.getCurrentRevisionId=function(){return this.getDescriptorRevisionId(this.getDescriptor())};DrawioFile.prototype.setCurrentEtag=function(b){this.setDescriptorEtag(this.getDescriptor(),b)};DrawioFile.prototype.getCurrentEtag=function(){return this.getDescriptorEtag(this.getDescriptor())};DrawioFile.prototype.getDescriptor=function(){return null};DrawioFile.prototype.setDescriptor=function(){};DrawioFile.prototype.setDescriptorRevisionId=function(b,d){this.setDescriptorEtag(b,d)};
+DrawioFile.prototype.getDescriptorRevisionId=function(b){return this.getDescriptorEtag(b)};DrawioFile.prototype.setDescriptorEtag=function(b,d){};DrawioFile.prototype.getDescriptorEtag=function(b){return null};DrawioFile.prototype.getDescriptorSecret=function(b){return null};
+DrawioFile.prototype.installListeners=function(){null==this.changeListener&&(this.changeListener=mxUtils.bind(this,function(b,d){b=null!=d?d.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=b&&b.ignoreEdit||this.fileChanged()}),this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener),this.ui.editor.graph.addListener("gridSizeChanged",this.changeListener),this.ui.editor.graph.addListener("shadowVisibleChanged",this.changeListener),this.ui.addListener("pageFormatChanged",
this.changeListener),this.ui.addListener("pageScaleChanged",this.changeListener),this.ui.addListener("backgroundColorChanged",this.changeListener),this.ui.addListener("backgroundImageChanged",this.changeListener),this.ui.addListener("foldingEnabledChanged",this.changeListener),this.ui.addListener("mathEnabledChanged",this.changeListener),this.ui.addListener("gridEnabledChanged",this.changeListener),this.ui.addListener("guidesEnabledChanged",this.changeListener),this.ui.addListener("tooltipsEnabledChanged",
this.changeListener),this.ui.addListener("pageViewChanged",this.changeListener),this.ui.addListener("connectionPointsChanged",this.changeListener),this.ui.addListener("connectionArrowsChanged",this.changeListener))};
DrawioFile.prototype.addAllSavedStatus=function(b){null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this&&(b=null!=b?b:mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey)),this.ui.editor.setStatus('<div title="'+b+'">'+b+"</div>"),b=this.ui.statusContainer.getElementsByTagName("div"),0<b.length&&this.isRevisionHistorySupported()&&(b[0].style.cursor="pointer",b[0].style.textDecoration="underline",mxEvent.addListener(b[0],"click",mxUtils.bind(this,function(){this.ui.actions.get("revisionHistory").funct()}))))};
-DrawioFile.prototype.saveDraft=function(){try{null==this.draftId&&(this.draftId=null!=this.usedDraftId?this.usedDraftId:Editor.guid());var b={type:"draft",created:this.created,modified:(new Date).getTime(),data:this.ui.getFileData(),title:this.getTitle(),fileObject:this.fileObject,aliveCheck:this.ui.draftAliveCheck};this.ui.setDatabaseItem(".draft_"+this.draftId,JSON.stringify(b));EditorUi.debug("DrawioFile.saveDraft",[this],"draftId",this.draftId,[b])}catch(e){this.removeDraft()}};
+DrawioFile.prototype.saveDraft=function(){try{null==this.draftId&&(this.draftId=null!=this.usedDraftId?this.usedDraftId:Editor.guid());var b={type:"draft",created:this.created,modified:(new Date).getTime(),data:this.ui.getFileData(),title:this.getTitle(),fileObject:this.fileObject,aliveCheck:this.ui.draftAliveCheck};this.ui.setDatabaseItem(".draft_"+this.draftId,JSON.stringify(b));EditorUi.debug("DrawioFile.saveDraft",[this],"draftId",this.draftId,[b])}catch(d){this.removeDraft()}};
DrawioFile.prototype.removeDraft=function(){try{null!=this.draftId&&(EditorUi.debug("DrawioFile.removeDraft",[this],"draftId",this.draftId),this.ui.removeDatabaseItem(".draft_"+this.draftId),this.usedDraftId=this.draftId,this.draftId=null)}catch(b){}};
-DrawioFile.prototype.addUnsavedStatus=function(b){if(!this.inConflictState&&null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this)if(b instanceof Error&&null!=b.message&&""!=b.message){var e=mxUtils.htmlEntities(mxResources.get("unsavedChanges"));this.ui.editor.setStatus('<div title="'+e+'" class="geStatusAlert">'+e+" ("+mxUtils.htmlEntities(b.message)+")</div>");e=this.ui.statusContainer.getElementsByTagName("div");null!=e&&0<e.length&&(e[0].style.cursor="pointer",mxEvent.addListener(e[0],
-"click",mxUtils.bind(this,function(){this.ui.showError(mxResources.get("unsavedChanges"),mxUtils.htmlEntities(b.message))})))}else{e=this.getErrorMessage(b);if(null==e&&null!=this.lastSaved){var k=this.ui.timeSince(new Date(this.lastSaved));null!=k&&(e=mxResources.get("lastSaved",[k]))}null!=e&&60<e.length&&(e=e.substring(0,60)+"...");e=mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+(null!=e&&""!=e?" ("+mxUtils.htmlEntities(e)+")":"");this.ui.editor.setStatus('<div title="'+
-e+'" class="geStatusAlertOrange">'+e+' <img src="'+Editor.saveImage+'"/></div>');e=this.ui.statusContainer.getElementsByTagName("div");null!=e&&0<e.length?(e[0].style.cursor="pointer",mxEvent.addListener(e[0],"click",mxUtils.bind(this,function(){this.ui.actions.get(null!=this.ui.mode&&this.isEditable()?"save":"saveAs").funct()}))):(e=mxUtils.htmlEntities(mxResources.get("unsavedChanges")),this.ui.editor.setStatus('<div title="'+e+'" class="geStatusAlert">'+e+" ("+mxUtils.htmlEntities(b.message)+")</div>"));
+DrawioFile.prototype.addUnsavedStatus=function(b){if(!this.inConflictState&&null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this)if(b instanceof Error&&null!=b.message&&""!=b.message){var d=mxUtils.htmlEntities(mxResources.get("unsavedChanges"));this.ui.editor.setStatus('<div title="'+d+'" class="geStatusAlert">'+d+" ("+mxUtils.htmlEntities(b.message)+")</div>");d=this.ui.statusContainer.getElementsByTagName("div");null!=d&&0<d.length&&(d[0].style.cursor="pointer",mxEvent.addListener(d[0],
+"click",mxUtils.bind(this,function(){this.ui.showError(mxResources.get("unsavedChanges"),mxUtils.htmlEntities(b.message))})))}else{d=this.getErrorMessage(b);if(null==d&&null!=this.lastSaved){var g=this.ui.timeSince(new Date(this.lastSaved));null!=g&&(d=mxResources.get("lastSaved",[g]))}null!=d&&60<d.length&&(d=d.substring(0,60)+"...");d=mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+(null!=d&&""!=d?" ("+mxUtils.htmlEntities(d)+")":"");this.ui.editor.setStatus('<div title="'+
+d+'" class="geStatusAlertOrange">'+d+' <img src="'+Editor.saveImage+'"/></div>');d=this.ui.statusContainer.getElementsByTagName("div");null!=d&&0<d.length?(d[0].style.cursor="pointer",mxEvent.addListener(d[0],"click",mxUtils.bind(this,function(){this.ui.actions.get(null!=this.ui.mode&&this.isEditable()?"save":"saveAs").funct()}))):(d=mxUtils.htmlEntities(mxResources.get("unsavedChanges")),this.ui.editor.setStatus('<div title="'+d+'" class="geStatusAlert">'+d+" ("+mxUtils.htmlEntities(b.message)+")</div>"));
EditorUi.enableDrafts&&(null==this.getMode()||EditorUi.isElectronApp)&&(this.lastDraftSave=this.lastDraftSave||Date.now(),null!=this.saveDraftThread&&(window.clearTimeout(this.saveDraftThread),this.saveDraftThread=null,Date.now()-this.lastDraftSave>Math.max(2*EditorUi.draftSaveDelay,3E4)&&(this.lastDraftSave=Date.now(),this.saveDraft())),this.saveDraftThread=window.setTimeout(mxUtils.bind(this,function(){this.lastDraftSave=Date.now();this.saveDraftThread=null;this.saveDraft()}),EditorUi.draftSaveDelay||
0))}};
-DrawioFile.prototype.addConflictStatus=function(b,e){this.invalidChecksum&&null==e&&(e=mxResources.get("checksum"));this.setConflictStatus(mxUtils.htmlEntities(mxResources.get("fileChangedSync"))+(null!=e&&""!=e?" ("+mxUtils.htmlEntities(e)+")":""));this.ui.spinner.stop();this.clearAutosave();e=null!=this.ui.statusContainer?this.ui.statusContainer.getElementsByTagName("div"):null;null!=e&&0<e.length?(e[0].style.cursor="pointer",mxEvent.addListener(e[0],"click",mxUtils.bind(this,function(k){"IMG"!=mxEvent.getSource(k).nodeName&&
+DrawioFile.prototype.addConflictStatus=function(b,d){this.invalidChecksum&&null==d&&(d=mxResources.get("checksum"));this.setConflictStatus(mxUtils.htmlEntities(mxResources.get("fileChangedSync"))+(null!=d&&""!=d?" ("+mxUtils.htmlEntities(d)+")":""));this.ui.spinner.stop();this.clearAutosave();d=null!=this.ui.statusContainer?this.ui.statusContainer.getElementsByTagName("div"):null;null!=d&&0<d.length?(d[0].style.cursor="pointer",mxEvent.addListener(d[0],"click",mxUtils.bind(this,function(g){"IMG"!=mxEvent.getSource(g).nodeName&&
b()}))):this.ui.alert(mxUtils.htmlEntities(mxResources.get("fileChangedSync")),b)};DrawioFile.prototype.setConflictStatus=function(b){this.ui.editor.setStatus('<div title="'+b+'" class="geStatusAlert">'+b+' <a href="https://www.diagrams.net/doc/faq/synchronize" title="'+mxResources.get("help")+'" target="_blank"><img src="'+Editor.helpImage+'"/></a></div>')};
-DrawioFile.prototype.showRefreshDialog=function(b,e,k){null==k&&(k=mxResources.get("checksum"));this.ui.editor.isChromelessView()&&!this.ui.editor.editable?this.ui.alert(mxResources.get("fileChangedSync"),mxUtils.bind(this,function(){this.reloadFile(b,e)})):(this.addConflictStatus(mxUtils.bind(this,function(){this.showRefreshDialog(b,e)}),k),this.ui.showError(mxResources.get("warning")+" ("+k+")",mxResources.get("fileChangedSyncDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,
-e)}),null,mxResources.get("merge"),mxUtils.bind(this,function(){this.reloadFile(b,e)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,130))};
-DrawioFile.prototype.showCopyDialog=function(b,e,k){this.invalidChecksum=this.inConflictState=!1;this.addUnsavedStatus();this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedOverwriteDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,e)}),null,mxResources.get("overwrite"),k,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,150)};
-DrawioFile.prototype.showConflictDialog=function(b,e){this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedSyncDialog"),mxResources.get("overwrite"),b,null,mxResources.get("merge"),e,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog();this.handleFileError(null,!1)}),380,130)};
-DrawioFile.prototype.redirectToNewApp=function(b,e){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var k=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),m=mxResources.get("redirectToNewApp");null!=e&&(m+=" ("+e+")");e=mxUtils.bind(this,function(){var C=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==k?window.location.reload():window.location.href=
-k});null==b&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),C,mxResources.get("cancel"),mxResources.get("discardChanges")):C()});null!=b?this.isModified()?this.ui.confirm(m,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()}),e,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(m,e,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()})):this.ui.alert(mxResources.get("redirectToNewApp"),
-e)}};
+DrawioFile.prototype.showRefreshDialog=function(b,d,g){null==g&&(g=mxResources.get("checksum"));this.ui.editor.isChromelessView()&&!this.ui.editor.editable?this.ui.alert(mxResources.get("fileChangedSync"),mxUtils.bind(this,function(){this.reloadFile(b,d)})):(this.addConflictStatus(mxUtils.bind(this,function(){this.showRefreshDialog(b,d)}),g),this.ui.showError(mxResources.get("warning")+" ("+g+")",mxResources.get("fileChangedSyncDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,
+d)}),null,mxResources.get("merge"),mxUtils.bind(this,function(){this.reloadFile(b,d)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,130))};
+DrawioFile.prototype.showCopyDialog=function(b,d,g){this.invalidChecksum=this.inConflictState=!1;this.addUnsavedStatus();this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedOverwriteDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,d)}),null,mxResources.get("overwrite"),g,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,150)};
+DrawioFile.prototype.showConflictDialog=function(b,d){this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedSyncDialog"),mxResources.get("overwrite"),b,null,mxResources.get("merge"),d,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog();this.handleFileError(null,!1)}),380,130)};
+DrawioFile.prototype.redirectToNewApp=function(b,d){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var g=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),l=mxResources.get("redirectToNewApp");null!=d&&(l+=" ("+d+")");d=mxUtils.bind(this,function(){var D=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==g?window.location.reload():window.location.href=
+g});null==b&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),D,mxResources.get("cancel"),mxResources.get("discardChanges")):D()});null!=b?this.isModified()?this.ui.confirm(l,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()}),d,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(l,d,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()})):this.ui.alert(mxResources.get("redirectToNewApp"),
+d)}};
DrawioFile.prototype.handleFileSuccess=function(b){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(EditorUi.debug("DrawioFile.handleFileSuccess",[this],"saved",b,"modified",this.isModified()),this.isModified()?this.fileChanged():b?(this.isTrashed()?this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey))+" ("+mxUtils.htmlEntities(mxResources.get("fileMovedToTrash"))+")"):this.addAllSavedStatus(),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=
!1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))};
-DrawioFile.prototype.handleFileError=function(b,e){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.inConflictState?this.handleConflictError(b,e):(this.isModified()&&this.addUnsavedStatus(b),e?this.ui.handleError(b,null!=b?mxResources.get("errorSavingFile"):null):this.isModified()||(b=this.getErrorMessage(b),null!=b&&60<b.length&&(b=b.substring(0,60)+"..."),this.ui.editor.setStatus('<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("error"))+(null!=b?" ("+mxUtils.htmlEntities(b)+
+DrawioFile.prototype.handleFileError=function(b,d){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.inConflictState?this.handleConflictError(b,d):(this.isModified()&&this.addUnsavedStatus(b),d?this.ui.handleError(b,null!=b?mxResources.get("errorSavingFile"):null):this.isModified()||(b=this.getErrorMessage(b),null!=b&&60<b.length&&(b=b.substring(0,60)+"..."),this.ui.editor.setStatus('<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("error"))+(null!=b?" ("+mxUtils.htmlEntities(b)+
")":"")+"</div>"))))};
-DrawioFile.prototype.handleConflictError=function(b,e){var k=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),m=mxUtils.bind(this,function(F){this.handleFileError(F,!0)}),C=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,k,m,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),p=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
-this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,k,m,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),m)});"none"==DrawioFile.SYNC?this.showCopyDialog(k,m,C):this.invalidChecksum?this.showRefreshDialog(k,m,this.getErrorMessage(b)):e?this.showConflictDialog(C,p):this.addConflictStatus(mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));
-this.synchronizeFile(k,m)}),this.getErrorMessage(b))};DrawioFile.prototype.getErrorMessage=function(b){var e=null!=b?null!=b.error?b.error.message:b.message:null;null==e&&null!=b&&b.code==App.ERROR_TIMEOUT&&(e=mxResources.get("timeout"));return e};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
-DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=new Date;this.setModified(!0);EditorUi.debug("DrawioFile.fileChanged",[this],"autosave",this.isAutosave(),"saving",this.savingFile);this.isAutosave()?(null!=this.savingStatusKey&&this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(e){this.ui.stopSanityCheck();
-null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(e){this.handleFileError(e)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus());null!=this.sync&&b&&this.sync.localFileChanged()};
-DrawioFile.prototype.createSecret=function(b){var e=Editor.guid(32);null==this.sync||this.isOptimisticSync()?b(e):this.sync.createToken(e,mxUtils.bind(this,function(k){b(e,k)}),mxUtils.bind(this,function(){b(e)}))};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};
-DrawioFile.prototype.fileSaved=function(b,e,k,m,C){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++;this.invalidChecksum=this.inConflictState=!1;var p=this.ui.getPagesForXml(b);null==this.sync||this.isOptimisticSync()?(this.setShadowPages(p),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=k&&k()):this.sync.fileSaved(p,e,k,m,C)}catch(P){this.invalidChecksum=this.inConflictState=
-!0;this.descriptorChanged();null!=m&&m(P);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,P);else{var F=this.getCurrentUser(),L=null!=F?F.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),L,P)}}catch(d){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)};
-DrawioFile.prototype.autosave=function(b,e,k,m){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosave<e?b:0;this.clearAutosave();var C=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==C&&(this.autosaveThread=null);EditorUi.debug("DrawioFile.autosave",[this],"thread",C,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile);if(this.isModified()&&this.isAutosaveNow()){var p=this.isAutosaveRevision();
-p&&(this.lastAutosaveRevision=(new Date).getTime());this.save(p,mxUtils.bind(this,function(F){this.autosaveCompleted();null!=k&&k(F)}),mxUtils.bind(this,function(F){null!=m&&m(F)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=k&&k(null)}),b);EditorUi.debug("DrawioFile.autosave",[this],"thread",C,"delay",b,"saving",this.savingFile);this.autosaveThread=C};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};
+DrawioFile.prototype.handleConflictError=function(b,d){var g=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),l=mxUtils.bind(this,function(E){this.handleFileError(E,!0)}),D=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,g,l,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),p=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
+this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,g,l,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),l)});"none"==DrawioFile.SYNC?this.showCopyDialog(g,l,D):this.invalidChecksum?this.showRefreshDialog(g,l,this.getErrorMessage(b)):d?this.showConflictDialog(D,p):this.addConflictStatus(mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));
+this.synchronizeFile(g,l)}),this.getErrorMessage(b))};DrawioFile.prototype.getErrorMessage=function(b){var d=null!=b?null!=b.error?b.error.message:b.message:null;null==d&&null!=b&&b.code==App.ERROR_TIMEOUT&&(d=mxResources.get("timeout"));return d};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
+DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=new Date;this.setModified(!0);EditorUi.debug("DrawioFile.fileChanged",[this],"autosave",this.isAutosave(),"saving",this.savingFile);this.isAutosave()?(null!=this.savingStatusKey&&this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(d){this.ui.stopSanityCheck();
+null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(d){this.handleFileError(d)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus());null!=this.sync&&b&&this.sync.localFileChanged()};
+DrawioFile.prototype.createSecret=function(b){var d=Editor.guid(32);null==this.sync||this.isOptimisticSync()?b(d):this.sync.createToken(d,mxUtils.bind(this,function(g){b(d,g)}),mxUtils.bind(this,function(){b(d)}))};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};
+DrawioFile.prototype.fileSaved=function(b,d,g,l,D){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++;this.invalidChecksum=this.inConflictState=!1;var p=this.ui.getPagesForXml(b);null==this.sync||this.isOptimisticSync()?(this.setShadowPages(p),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=g&&g()):this.sync.fileSaved(p,d,g,l,D)}catch(R){this.invalidChecksum=this.inConflictState=
+!0;this.descriptorChanged();null!=l&&l(R);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,R);else{var E=this.getCurrentUser(),N=null!=E?E.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),N,R)}}catch(G){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)};
+DrawioFile.prototype.autosave=function(b,d,g,l){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosave<d?b:0;this.clearAutosave();var D=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==D&&(this.autosaveThread=null);EditorUi.debug("DrawioFile.autosave",[this],"thread",D,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile);if(this.isModified()&&this.isAutosaveNow()){var p=this.isAutosaveRevision();
+p&&(this.lastAutosaveRevision=(new Date).getTime());this.save(p,mxUtils.bind(this,function(E){this.autosaveCompleted();null!=g&&g(E)}),mxUtils.bind(this,function(E){null!=l&&l(E)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=g&&g(null)}),b);EditorUi.debug("DrawioFile.autosave",[this],"thread",D,"delay",b,"saving",this.savingFile);this.autosaveThread=D};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};
DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var b=(new Date).getTime();return null==this.lastAutosaveRevision||b-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};
-DrawioFile.prototype.close=function(b){this.updateFileData();this.stats.closed++;this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,b);this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,e){if(null!=b&&null!=e){var k=b.lastIndexOf(".");b=0<k?b.substring(k):"";k=e.lastIndexOf(".");return b===(0<k?e.substring(k):"")}return b==e};
+DrawioFile.prototype.close=function(b){this.updateFileData();this.stats.closed++;this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,b);this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,d){if(null!=b&&null!=d){var g=b.lastIndexOf(".");b=0<g?b.substring(g):"";g=d.lastIndexOf(".");return b===(0<g?d.substring(g):"")}return b==d};
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,k){e(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,e){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,e)};LocalFile=function(b,e,k,m,C,p){DrawioFile.call(this,b,e);this.title=k;this.mode=m?null:App.MODE_DEVICE;this.fileHandle=C;this.desc=p};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};
-LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(b,e,k){this.saveAs(this.title,e,k)};LocalFile.prototype.saveAs=function(b,e,k){this.saveFile(b,!1,e,k)};LocalFile.prototype.saveAs=function(b,e,k){this.saveFile(b,!1,e,k)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};
-LocalFile.prototype.getLatestVersion=function(b,e){null==this.fileHandle?b(null):this.ui.loadFileSystemEntry(this.fileHandle,b,e)};
-LocalFile.prototype.saveFile=function(b,e,k,m,C){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;C||this.updateFileData();var p=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var F=this.getData(),L=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=k&&k()}),P=mxUtils.bind(this,function(d){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var f=mxUtils.bind(this,
-function(x){this.savingFile=!1;null!=m&&m({error:x})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(x){this.fileHandle.getFile().then(mxUtils.bind(this,function(y){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[y],"conflict",this.desc.lastModified!=y.lastModified);this.desc.lastModified==y.lastModified?x.write(p?this.ui.base64ToBlob(d,"image/png"):d).then(mxUtils.bind(this,function(){x.close().then(mxUtils.bind(this,
-function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(t){try{var G=this.desc;this.savingFile=!1;this.desc=t;this.fileSaved(F,G,L,f);this.removeDraft()}catch(D){f(D)}}),f)}),f)}),f):(this.inConflictState=!0,f())}),mxUtils.bind(this,function(y){this.invalidFileHandle=!0;f(y)}))}),f)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(d,b,p?"image/png":"text/xml",p);else if(d.length<MAX_REQUEST_SIZE){var g=b.lastIndexOf(".");g=0<g?b.substring(g+1):"xml";
-(new mxXmlRequest(SAVE_URL,"format="+g+"&xml="+encodeURIComponent(d)+"&filename="+encodeURIComponent(b)+(p?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}));L()}});p?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(d){P(d)}),m,this.ui.getCurrentFile()!=this?F:null,e.scale,e.border)):P(F)};
-LocalFile.prototype.rename=function(b,e,k){this.title=b;this.descriptorChanged();null!=e&&e()};LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"},
-{description:"diagramXmlDesc",extension:"xml",mimeType:"text/xml"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.styles=[{},{commonStyle:{fontColor:"#5C5C5C",strokeColor:"#006658",fillColor:"#21C0A5"}},{commonStyle:{fontColor:"#095C86",strokeColor:"#AF45ED",fillColor:"#F694C1"},edgeStyle:{strokeColor:"#60E696"}},
-{commonStyle:{fontColor:"#46495D",strokeColor:"#788AA3",fillColor:"#B2C9AB"}},{commonStyle:{fontColor:"#5AA9E6",strokeColor:"#FF6392",fillColor:"#FFE45E"}},{commonStyle:{fontColor:"#1D3557",strokeColor:"#457B9D",fillColor:"#A8DADC"},graph:{background:"#F1FAEE"}},{commonStyle:{fontColor:"#393C56",strokeColor:"#E07A5F",fillColor:"#F2CC8F"},graph:{background:"#F4F1DE",gridColor:"#D4D0C0"}},{commonStyle:{fontColor:"#143642",strokeColor:"#0F8B8D",fillColor:"#FAE5C7"},edgeStyle:{strokeColor:"#A8201A"},
-graph:{background:"#DAD2D8",gridColor:"#ABA4A9"}},{commonStyle:{fontColor:"#FEFAE0",strokeColor:"#DDA15E",fillColor:"#BC6C25"},graph:{background:"#283618",gridColor:"#48632C"}},{commonStyle:{fontColor:"#E4FDE1",strokeColor:"#028090",fillColor:"#F45B69"},graph:{background:"#114B5F",gridColor:"#0B3240"}},{},{vertexStyle:{strokeColor:"#D0CEE2",fillColor:"#FAD9D5"},edgeStyle:{strokeColor:"#09555B"},commonStyle:{fontColor:"#1A1A1A"}},{vertexStyle:{strokeColor:"#BAC8D3",fillColor:"#09555B",fontColor:"#EEEEEE"},
-edgeStyle:{strokeColor:"#0B4D6A"}},{vertexStyle:{strokeColor:"#D0CEE2",fillColor:"#5D7F99"},edgeStyle:{strokeColor:"#736CA8"},commonStyle:{fontColor:"#1A1A1A"}},{vertexStyle:{strokeColor:"#FFFFFF",fillColor:"#182E3E",fontColor:"#FFFFFF"},edgeStyle:{strokeColor:"#23445D"},graph:{background:"#FCE7CD",gridColor:"#CFBDA8"}},{vertexStyle:{strokeColor:"#FFFFFF",fillColor:"#F08E81"},edgeStyle:{strokeColor:"#182E3E"},commonStyle:{fontColor:"#1A1A1A"},graph:{background:"#B0E3E6",gridColor:"#87AEB0"}},{vertexStyle:{strokeColor:"#909090",
-fillColor:"#F5AB50"},edgeStyle:{strokeColor:"#182E3E"},commonStyle:{fontColor:"#1A1A1A"},graph:{background:"#EEEEEE"}},{vertexStyle:{strokeColor:"#EEEEEE",fillColor:"#56517E",fontColor:"#FFFFFF"},edgeStyle:{strokeColor:"#182E3E"},graph:{background:"#FAD9D5",gridColor:"#BFA6A3"}},{vertexStyle:{strokeColor:"#BAC8D3",fillColor:"#B1DDF0",fontColor:"#182E3E"},edgeStyle:{strokeColor:"#EEEEEE",fontColor:"#FFFFFF"},graph:{background:"#09555B",gridColor:"#13B4C2"}},{vertexStyle:{fillColor:"#EEEEEE",fontColor:"#1A1A1A"},
-edgeStyle:{fontColor:"#FFFFFF"},commonStyle:{strokeColor:"#FFFFFF"},graph:{background:"#182E3E",gridColor:"#4D94C7"}}];Editor.logoImage="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzA2LjE4NSAxMjAuMjk2IgogICB2aWV3Qm94PSIyNCAyNiA2OCA2OCIKICAgeT0iMHB4IgogICB4PSIwcHgiCiAgIHZlcnNpb249IjEuMSI+CiAgIAkgPGc+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNDEuMDYxIgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjkiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTUyOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNzUuMDc2IgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjgiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTAwOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGc+PHBhdGgKICAgICAgICAgZD0iTTUyLjc3Myw3Ny4wODRjMCwxLjk1NC0xLjU5OSwzLjU1My0zLjU1MywzLjU1M0gzNi45OTljLTEuOTU0LDAtMy41NTMtMS41OTktMy41NTMtMy41NTN2LTkuMzc5ICAgIGMwLTEuOTU0LDEuNTk5LTMuNTUzLDMuNTUzLTMuNTUzaDEyLjIyMmMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjc3LjA4NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnCiAgICAgICBpZD0iZzM0MTkiPjxwYXRoCiAgICAgICAgIGQ9Ik02Ny43NjIsNDguMDc0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINTEuOTg4Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M0g2NC4yMWMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjQ4LjA3NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnPjxwYXRoCiAgICAgICAgIGQ9Ik04Mi43NTIsNzcuMDg0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINjYuOTc3Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M2gxMi4yMjJjMS45NTQsMCwzLjU1MywxLjU5OSwzLjU1MywzLjU1M1Y3Ny4wODR6IgogICAgICAgICBmaWxsPSIjRkZGRkZGIiAvPjwvZz48L2c+PC9zdmc+";
+DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,d){b([])};DrawioFile.prototype.addComment=function(b,d,g){d(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,d){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,d)};LocalFile=function(b,d,g,l,D,p){DrawioFile.call(this,b,d);this.title=g;this.mode=l?null:App.MODE_DEVICE;this.fileHandle=D;this.desc=p};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};
+LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(b,d,g){this.saveAs(this.title,d,g)};LocalFile.prototype.saveAs=function(b,d,g){this.saveFile(b,!1,d,g)};LocalFile.prototype.saveAs=function(b,d,g){this.saveFile(b,!1,d,g)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};
+LocalFile.prototype.getLatestVersion=function(b,d){null==this.fileHandle?b(null):this.ui.loadFileSystemEntry(this.fileHandle,b,d)};
+LocalFile.prototype.saveFile=function(b,d,g,l,D){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;D||this.updateFileData();var p=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var E=this.getData(),N=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=g&&g()}),R=mxUtils.bind(this,function(G){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var M=mxUtils.bind(this,
+function(e){this.savingFile=!1;null!=l&&l({error:e})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(e){this.fileHandle.getFile().then(mxUtils.bind(this,function(f){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[f],"conflict",this.desc.lastModified!=f.lastModified);this.desc.lastModified==f.lastModified?e.write(p?this.ui.base64ToBlob(G,"image/png"):G).then(mxUtils.bind(this,function(){e.close().then(mxUtils.bind(this,
+function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(k){try{var z=this.desc;this.savingFile=!1;this.desc=k;this.fileSaved(E,z,N,M);this.removeDraft()}catch(t){M(t)}}),M)}),M)}),M):(this.inConflictState=!0,M())}),mxUtils.bind(this,function(f){this.invalidFileHandle=!0;M(f)}))}),M)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(G,b,p?"image/png":"text/xml",p);else if(G.length<MAX_REQUEST_SIZE){var Q=b.lastIndexOf(".");Q=0<Q?b.substring(Q+1):"xml";
+(new mxXmlRequest(SAVE_URL,"format="+Q+"&xml="+encodeURIComponent(G)+"&filename="+encodeURIComponent(b)+(p?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(G)}));N()}});p?(d=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(G){R(G)}),l,this.ui.getCurrentFile()!=this?E:null,d.scale,d.border)):R(E)};
+LocalFile.prototype.rename=function(b,d,g){this.title=b;this.descriptorChanged();null!=d&&d()};LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"},
+{description:"diagramXmlDesc",extension:"xml",mimeType:"text/xml"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,
+fontUrl:decodeURIComponent(Editor.sketchFontSource)}];Editor.styles=[{},{commonStyle:{fontColor:"#5C5C5C",strokeColor:"#006658",fillColor:"#21C0A5"}},{commonStyle:{fontColor:"#095C86",strokeColor:"#AF45ED",fillColor:"#F694C1"},edgeStyle:{strokeColor:"#60E696"}},{commonStyle:{fontColor:"#46495D",strokeColor:"#788AA3",fillColor:"#B2C9AB"}},{commonStyle:{fontColor:"#5AA9E6",strokeColor:"#FF6392",fillColor:"#FFE45E"}},{commonStyle:{fontColor:"#1D3557",strokeColor:"#457B9D",fillColor:"#A8DADC"},graph:{background:"#F1FAEE"}},
+{commonStyle:{fontColor:"#393C56",strokeColor:"#E07A5F",fillColor:"#F2CC8F"},graph:{background:"#F4F1DE",gridColor:"#D4D0C0"}},{commonStyle:{fontColor:"#143642",strokeColor:"#0F8B8D",fillColor:"#FAE5C7"},edgeStyle:{strokeColor:"#A8201A"},graph:{background:"#DAD2D8",gridColor:"#ABA4A9"}},{commonStyle:{fontColor:"#FEFAE0",strokeColor:"#DDA15E",fillColor:"#BC6C25"},graph:{background:"#283618",gridColor:"#48632C"}},{commonStyle:{fontColor:"#E4FDE1",strokeColor:"#028090",fillColor:"#F45B69"},graph:{background:"#114B5F",
+gridColor:"#0B3240"}},{},{vertexStyle:{strokeColor:"#D0CEE2",fillColor:"#FAD9D5"},edgeStyle:{strokeColor:"#09555B"},commonStyle:{fontColor:"#1A1A1A"}},{vertexStyle:{strokeColor:"#BAC8D3",fillColor:"#09555B",fontColor:"#EEEEEE"},edgeStyle:{strokeColor:"#0B4D6A"}},{vertexStyle:{strokeColor:"#D0CEE2",fillColor:"#5D7F99"},edgeStyle:{strokeColor:"#736CA8"},commonStyle:{fontColor:"#1A1A1A"}},{vertexStyle:{strokeColor:"#FFFFFF",fillColor:"#182E3E",fontColor:"#FFFFFF"},edgeStyle:{strokeColor:"#23445D"},graph:{background:"#FCE7CD",
+gridColor:"#CFBDA8"}},{vertexStyle:{strokeColor:"#FFFFFF",fillColor:"#F08E81"},edgeStyle:{strokeColor:"#182E3E"},commonStyle:{fontColor:"#1A1A1A"},graph:{background:"#B0E3E6",gridColor:"#87AEB0"}},{vertexStyle:{strokeColor:"#909090",fillColor:"#F5AB50"},edgeStyle:{strokeColor:"#182E3E"},commonStyle:{fontColor:"#1A1A1A"},graph:{background:"#EEEEEE"}},{vertexStyle:{strokeColor:"#EEEEEE",fillColor:"#56517E",fontColor:"#FFFFFF"},edgeStyle:{strokeColor:"#182E3E"},graph:{background:"#FAD9D5",gridColor:"#BFA6A3"}},
+{vertexStyle:{strokeColor:"#BAC8D3",fillColor:"#B1DDF0",fontColor:"#182E3E"},edgeStyle:{strokeColor:"#EEEEEE",fontColor:"#FFFFFF"},graph:{background:"#09555B",gridColor:"#13B4C2"}},{vertexStyle:{fillColor:"#EEEEEE",fontColor:"#1A1A1A"},edgeStyle:{fontColor:"#FFFFFF"},commonStyle:{strokeColor:"#FFFFFF"},graph:{background:"#182E3E",gridColor:"#4D94C7"}}];Editor.logoImage="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzA2LjE4NSAxMjAuMjk2IgogICB2aWV3Qm94PSIyNCAyNiA2OCA2OCIKICAgeT0iMHB4IgogICB4PSIwcHgiCiAgIHZlcnNpb249IjEuMSI+CiAgIAkgPGc+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNDEuMDYxIgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjkiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTUyOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNzUuMDc2IgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjgiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTAwOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGc+PHBhdGgKICAgICAgICAgZD0iTTUyLjc3Myw3Ny4wODRjMCwxLjk1NC0xLjU5OSwzLjU1My0zLjU1MywzLjU1M0gzNi45OTljLTEuOTU0LDAtMy41NTMtMS41OTktMy41NTMtMy41NTN2LTkuMzc5ICAgIGMwLTEuOTU0LDEuNTk5LTMuNTUzLDMuNTUzLTMuNTUzaDEyLjIyMmMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjc3LjA4NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnCiAgICAgICBpZD0iZzM0MTkiPjxwYXRoCiAgICAgICAgIGQ9Ik02Ny43NjIsNDguMDc0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINTEuOTg4Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M0g2NC4yMWMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjQ4LjA3NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnPjxwYXRoCiAgICAgICAgIGQ9Ik04Mi43NTIsNzcuMDg0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINjYuOTc3Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M2gxMi4yMjJjMS45NTQsMCwzLjU1MywxLjU5OSwzLjU1MywzLjU1M1Y3Ny4wODR6IgogICAgICAgICBmaWxsPSIjRkZGRkZGIiAvPjwvZz48L2c+PC9zdmc+";
Editor.saveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iYmxhY2siIHdpZHRoPSIxOHB4IiBoZWlnaHQ9IjE4cHgiPjxwYXRoIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz48cGF0aCBkPSJNMTkgMTJ2N0g1di03SDN2N2MwIDEuMS45IDIgMiAyaDE0YzEuMSAwIDItLjkgMi0ydi03aC0yem0tNiAuNjdsMi41OS0yLjU4TDE3IDExLjVsLTUgNS01LTUgMS40MS0xLjQxTDExIDEyLjY3VjNoMnoiLz48L3N2Zz4=";Editor.globeImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTEuOTkgMkM2LjQ3IDIgMiA2LjQ4IDIgMTJzNC40NyAxMCA5Ljk5IDEwQzE3LjUyIDIyIDIyIDE3LjUyIDIyIDEyUzE3LjUyIDIgMTEuOTkgMnptNi45MyA2aC0yLjk1Yy0uMzItMS4yNS0uNzgtMi40NS0xLjM4LTMuNTYgMS44NC42MyAzLjM3IDEuOTEgNC4zMyAzLjU2ek0xMiA0LjA0Yy44MyAxLjIgMS40OCAyLjUzIDEuOTEgMy45NmgtMy44MmMuNDMtMS40MyAxLjA4LTIuNzYgMS45MS0zLjk2ek00LjI2IDE0QzQuMSAxMy4zNiA0IDEyLjY5IDQgMTJzLjEtMS4zNi4yNi0yaDMuMzhjLS4wOC42Ni0uMTQgMS4zMi0uMTQgMiAwIC42OC4wNiAxLjM0LjE0IDJINC4yNnptLjgyIDJoMi45NWMuMzIgMS4yNS43OCAyLjQ1IDEuMzggMy41Ni0xLjg0LS42My0zLjM3LTEuOS00LjMzLTMuNTZ6bTIuOTUtOEg1LjA4Yy45Ni0xLjY2IDIuNDktMi45MyA0LjMzLTMuNTZDOC44MSA1LjU1IDguMzUgNi43NSA4LjAzIDh6TTEyIDE5Ljk2Yy0uODMtMS4yLTEuNDgtMi41My0xLjkxLTMuOTZoMy44MmMtLjQzIDEuNDMtMS4wOCAyLjc2LTEuOTEgMy45NnpNMTQuMzQgMTRIOS42NmMtLjA5LS42Ni0uMTYtMS4zMi0uMTYtMiAwLS42OC4wNy0xLjM1LjE2LTJoNC42OGMuMDkuNjUuMTYgMS4zMi4xNiAyIDAgLjY4LS4wNyAxLjM0LS4xNiAyem0uMjUgNS41NmMuNi0xLjExIDEuMDYtMi4zMSAxLjM4LTMuNTZoMi45NWMtLjk2IDEuNjUtMi40OSAyLjkzLTQuMzMgMy41NnpNMTYuMzYgMTRjLjA4LS42Ni4xNC0xLjMyLjE0LTIgMC0uNjgtLjA2LTEuMzQtLjE0LTJoMy4zOGMuMTYuNjQuMjYgMS4zMS4yNiAycy0uMSAxLjM2LS4yNiAyaC0zLjM4eiIvPjwvc3ZnPg==";
Editor.commentImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMjEuOTkgNGMwLTEuMS0uODktMi0xLjk5LTJINGMtMS4xIDAtMiAuOS0yIDJ2MTJjMCAxLjEuOSAyIDIgMmgxNGw0IDQtLjAxLTE4ek0xOCAxNEg2di0yaDEydjJ6bTAtM0g2VjloMTJ2MnptMC0zSDZWNmgxMnYyeiIvPjxwYXRoIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz48L3N2Zz4=";Editor.userImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgMTJjMi4yMSAwIDQtMS43OSA0LTRzLTEuNzktNC00LTQtNCAxLjc5LTQgNCAxLjc5IDQgNCA0em0wIDJjLTIuNjcgMC04IDEuMzQtOCA0djJoMTZ2LTJjMC0yLjY2LTUuMzMtNC04LTR6Ii8+PC9zdmc+";
Editor.shareImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTggMTYuMDhjLS43NiAwLTEuNDQuMy0xLjk2Ljc3TDguOTEgMTIuN2MuMDUtLjIzLjA5LS40Ni4wOS0uN3MtLjA0LS40Ny0uMDktLjdsNy4wNS00LjExYy41NC41IDEuMjUuODEgMi4wNC44MSAxLjY2IDAgMy0xLjM0IDMtM3MtMS4zNC0zLTMtMy0zIDEuMzQtMyAzYzAgLjI0LjA0LjQ3LjA5LjdMOC4wNCA5LjgxQzcuNSA5LjMxIDYuNzkgOSA2IDljLTEuNjYgMC0zIDEuMzQtMyAzczEuMzQgMyAzIDNjLjc5IDAgMS41LS4zMSAyLjA0LS44MWw3LjEyIDQuMTZjLS4wNS4yMS0uMDguNDMtLjA4LjY1IDAgMS42MSAxLjMxIDIuOTIgMi45MiAyLjkyIDEuNjEgMCAyLjkyLTEuMzEgMi45Mi0yLjkycy0xLjMxLTIuOTItMi45Mi0yLjkyeiIvPjwvc3ZnPg==";
@@ -3129,580 +3128,583 @@ Editor.hiResImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAAC
Editor.loResImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAS1BMVEVAQEAAAAA1NTVBQUFDQ0NDQ0NFRUVERERBQUFBQUFBQUFAQEBBQUFBQUFCQkJCQkJCQkJBQUFCQkJDQ0NDQ0NCQkJCQkJCQkJGRkb5/XqTAAAAGXRSTlP+AAWODlASCsesX+Lc2LyWe3pwa1tCPjohjSJfoAAAAI1JREFUWMPt1MkKhTAMRuG0anvneXr/J71nUypKcdqI/N8yhLMKMZE1CahnClDQzMPB44ED3EgeCubgDWnWQMHpwTtKwTe+UHD4sJ94wbUEHHFGhILlYDeSnsQeabeCgsPBgB0MOZZ9oGA5GJFiJSfUULAfjLjARrhCwX7wh2YCDwVbwZkUBKqFFJRN+wOcwSgR2sREcgAAAABJRU5ErkJggg==";Editor.blankImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==";
Editor.facebookImage=IMAGE_PATH+"/facebook.png";Editor.tweetImage=IMAGE_PATH+"/tweet.png";Editor.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');Editor.configurationKey=".configuration";Editor.settingsKey=".drawio-config";Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableCustomProperties=!0;Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker=
"0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));Editor.enableWebFonts="1"!=urlParams["safe-style-src"];Editor.enableShadowOption=!mxClient.IS_SF;Editor.enableExportUrl=!0;Editor.enableRealtime=!0;Editor.compressXml=!0;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.config=null;Editor.configVersion=
-null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(q){q.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(q,E){return"1"!=mxUtils.getValue(q.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(q,
-E){return"1"==mxUtils.getValue(q.style,"comic","0")||"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"hachureAngle",
-dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?
-"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(q,E){return"1"==
-mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",
-defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},
+null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(q){q.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(q,F){return"1"!=mxUtils.getValue(q.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(q,
+F){return"1"==mxUtils.getValue(q.style,"comic","0")||"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"hachureAngle",
+dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?
+"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(q,F){return"1"==
+mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",
+defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},
{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"targetPortConstraint",dispName:"Target Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"jettySize",dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(q){return"orthogonalEdgeStyle"==mxUtils.getValue(q.style,mxConstants.STYLE_EDGE,null)}},{name:"fillOpacity",
dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"startFill",dispName:"Start Fill",type:"bool",defVal:!0},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"perimeterSpacing",dispName:"Terminal Spacing",type:"float",defVal:0},{name:"anchorPointDirection",dispName:"Anchor Direction",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"fixDash",
dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"bendable",dispName:"Bendable",type:"bool",defVal:!0},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"noJump",
-dispName:"No Jumps",type:"bool",defVal:!1},{name:"flowAnimation",dispName:"Flow Animation",type:"bool",defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(q,E){E=E.editorUi.editor.graph;return 1==q.vertices.length&&
-0==q.edges.length&&E.isTableCell(q.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(q,E){E=E.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&E.isTableCell(q.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(q,E){q=E.editorUi.editor.graph.getCellStyle(1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null);return"1"==mxUtils.getValue(q,"resizeLastRow","0")},
-isVisible:function(q,E){E=E.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&E.isTable(q.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(q,E){q=E.editorUi.editor.graph.getCellStyle(1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null);return"1"==mxUtils.getValue(q,"resizeLast","0")},isVisible:function(q,E){E=E.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&E.isTable(q.vertices[0])}},{name:"fillOpacity",
+dispName:"No Jumps",type:"bool",defVal:!1},{name:"flowAnimation",dispName:"Flow Animation",type:"bool",defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(q,F){F=F.editorUi.editor.graph;return 1==q.vertices.length&&
+0==q.edges.length&&F.isTableCell(q.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(q,F){F=F.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&F.isTableCell(q.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(q,F){q=F.editorUi.editor.graph.getCellStyle(1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null);return"1"==mxUtils.getValue(q,"resizeLastRow","0")},
+isVisible:function(q,F){F=F.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&F.isTable(q.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(q,F){q=F.editorUi.editor.graph.getCellStyle(1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null);return"1"==mxUtils.getValue(q,"resizeLast","0")},isVisible:function(q,F){F=F.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&F.isTable(q.vertices[0])}},{name:"fillOpacity",
dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"block",dispName:"Block"},{val:"fill",dispName:"Fill"},{val:"width",dispName:"Width"}]},{name:"noLabel",dispName:"Hide Label",type:"bool",defVal:!1},{name:"labelPadding",dispName:"Label Padding",type:"float",
defVal:0},{name:"direction",dispName:"Direction",type:"enum",defVal:"east",enumList:[{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",
-defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(q,E){return E.editorUi.editor.graph.isCellConnectable(0<q.vertices.length&&0==q.edges.length?q.vertices[0]:null)},isVisible:function(q,E){return 0<q.vertices.length&&0==q.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},
+defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(q,F){return F.editorUi.editor.graph.isCellConnectable(0<q.vertices.length&&0==q.edges.length?q.vertices[0]:null)},isVisible:function(q,F){return 0<q.vertices.length&&0==q.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},
{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},
-{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(q,E){return 1==q.vertices.length&&0==q.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(q,E){q=1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null;E=E.editorUi.editor.graph;return null!=q&&(E.isSwimlane(q)||0<E.model.getChildCount(q))},
-isVisible:function(q,E){return 1==q.vertices.length&&0==q.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(q,E){var Q=1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null;E=E.editorUi.editor.graph;return null!=Q&&(E.isContainer(Q)&&"0"!=q.style.collapsible||!E.isContainer(Q)&&"1"==q.style.collapsible)},isVisible:function(q,E){return 1==q.vertices.length&&0==q.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,
-isVisible:function(q,E){return 1==q.vertices.length&&0==q.edges.length&&!E.editorUi.editor.graph.isSwimlane(q.vertices[0])&&null==mxUtils.getValue(q.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(q,E){E=E.editorUi.editor.graph.model;return 0<q.vertices.length?E.isVertex(E.getParent(q.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",
-type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(q,E){q=0<q.vertices.length?E.editorUi.editor.graph.getCellGeometry(q.vertices[0]):null;return null!=q&&!q.relative}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"fixedWidth",dispName:"Fixed Width",type:"bool",defVal:!1},{name:"resizable",
+{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(q,F){return 1==q.vertices.length&&0==q.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(q,F){q=1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null;F=F.editorUi.editor.graph;return null!=q&&(F.isSwimlane(q)||0<F.model.getChildCount(q))},
+isVisible:function(q,F){return 1==q.vertices.length&&0==q.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(q,F){var S=1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null;F=F.editorUi.editor.graph;return null!=S&&(F.isContainer(S)&&"0"!=q.style.collapsible||!F.isContainer(S)&&"1"==q.style.collapsible)},isVisible:function(q,F){return 1==q.vertices.length&&0==q.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,
+isVisible:function(q,F){return 1==q.vertices.length&&0==q.edges.length&&!F.editorUi.editor.graph.isSwimlane(q.vertices[0])&&null==mxUtils.getValue(q.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(q,F){F=F.editorUi.editor.graph.model;return 0<q.vertices.length?F.isVertex(F.getParent(q.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",
+type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(q,F){q=0<q.vertices.length?F.editorUi.editor.graph.getCellGeometry(q.vertices[0]):null;return null!=q&&!q.relative}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"fixedWidth",dispName:"Fixed Width",type:"bool",defVal:!1},{name:"resizable",
dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",
-dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(q,E){var Q=mxUtils.getValue(q.style,mxConstants.STYLE_FILLCOLOR,null);return E.editorUi.editor.graph.isSwimlane(q.vertices[0])||null==Q||Q==mxConstants.NONE||0==mxUtils.getValue(q.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(q.style,mxConstants.STYLE_OPACITY,100)||null!=q.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(q,E){return 0<q.vertices.length&&
-E.editorUi.editor.graph.isContainer(q.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
-Editor.createRoughCanvas=function(q){var E=rough.canvas({getContext:function(){return q}});E.draw=function(Q){var Y=Q.sets||[];Q=Q.options||this.getDefaultOptions();for(var R=0;R<Y.length;R++){var Z=Y[R];switch(Z.type){case "path":null!=Q.stroke&&this._drawToContext(q,Z,Q);break;case "fillPath":this._drawToContext(q,Z,Q);break;case "fillSketch":this.fillSketch(q,Z,Q)}}};E.fillSketch=function(Q,Y,R){var Z=q.state.strokeColor,da=q.state.strokeWidth,qa=q.state.strokeAlpha,va=q.state.dashed,ja=R.fillWeight;
-0>ja&&(ja=R.strokeWidth/2);q.setStrokeAlpha(q.state.fillAlpha);q.setStrokeColor(R.fill||"");q.setStrokeWidth(ja);q.setDashed(!1);this._drawToContext(Q,Y,R);q.setDashed(va);q.setStrokeWidth(da);q.setStrokeColor(Z);q.setStrokeAlpha(qa)};E._drawToContext=function(Q,Y,R){Q.begin();for(var Z=0;Z<Y.ops.length;Z++){var da=Y.ops[Z],qa=da.data;switch(da.op){case "move":Q.moveTo(qa[0],qa[1]);break;case "bcurveTo":Q.curveTo(qa[0],qa[1],qa[2],qa[3],qa[4],qa[5]);break;case "lineTo":Q.lineTo(qa[0],qa[1])}}Q.end();
-"fillPath"===Y.type&&R.filled?Q.fill():Q.stroke()};return E};(function(){function q(Z,da,qa){this.canvas=Z;this.rc=da;this.shape=qa;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,q.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,q.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,q.prototype.rect);this.originalRoundrect=this.canvas.roundrect;
-this.canvas.roundrect=mxUtils.bind(this,q.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,q.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,q.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,q.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,q.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=
-mxUtils.bind(this,q.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,q.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,q.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,q.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,q.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,
-q.prototype.fillAndStroke);this.path=[];this.passThrough=!1}q.prototype.moveOp="M";q.prototype.lineOp="L";q.prototype.quadOp="Q";q.prototype.curveOp="C";q.prototype.closeOp="Z";q.prototype.getStyle=function(Z,da){var qa=1;if(null!=this.shape.state){var va=this.shape.state.cell.id;if(null!=va)for(var ja=0;ja<va.length;ja++)qa=(qa<<5)-qa+va.charCodeAt(ja)<<0}qa={strokeWidth:this.canvas.state.strokeWidth,seed:qa,preserveVertices:!0};va=this.rc.getDefaultOptions();qa.stroke=Z?this.canvas.state.strokeColor===
-mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;Z=null;(qa.filled=da)?(qa.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,Z=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):qa.fill="";qa.bowing=mxUtils.getValue(this.shape.style,"bowing",va.bowing);qa.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",va.hachureAngle);qa.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",va.curveFitting);
-qa.roughness=mxUtils.getValue(this.shape.style,"jiggle",va.roughness);qa.simplification=mxUtils.getValue(this.shape.style,"simplification",va.simplification);qa.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",va.disableMultiStroke);qa.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",va.disableMultiStrokeFill);da=mxUtils.getValue(this.shape.style,"hachureGap",-1);qa.hachureGap="auto"==da?-1:da;qa.dashGap=mxUtils.getValue(this.shape.style,"dashGap",
-da);qa.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",da);qa.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",da);da=mxUtils.getValue(this.shape.style,"fillWeight",-1);qa.fillWeight="auto"==da?-1:da;da=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==da&&(da=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),da=null!=qa.fill&&(null!=Z||null!=da&&qa.fill==da)?"solid":va.fillStyle);
-qa.fillStyle=da;return qa};q.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};q.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};q.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var Z=2;Z<arguments.length;Z+=2)this.lastX=arguments[Z-1],this.lastY=arguments[Z],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};
-q.prototype.lineTo=function(Z,da){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,Z,da),this.lastX=Z,this.lastY=da)};q.prototype.moveTo=function(Z,da){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,Z,da),this.lastX=Z,this.lastY=da,this.firstX=Z,this.firstY=da)};q.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};q.prototype.quadTo=function(Z,da,qa,
-va){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,Z,da,qa,va),this.lastX=qa,this.lastY=va)};q.prototype.curveTo=function(Z,da,qa,va,ja,sa){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,Z,da,qa,va,ja,sa),this.lastX=ja,this.lastY=sa)};q.prototype.arcTo=function(Z,da,qa,va,ja,sa,ya){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var Aa=mxUtils.arcToCurves(this.lastX,this.lastY,Z,da,qa,
-va,ja,sa,ya);if(null!=Aa)for(var Ea=0;Ea<Aa.length;Ea+=6)this.curveTo(Aa[Ea],Aa[Ea+1],Aa[Ea+2],Aa[Ea+3],Aa[Ea+4],Aa[Ea+5]);this.lastX=sa;this.lastY=ya}};q.prototype.rect=function(Z,da,qa,va){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(Z,da,qa,va,this.getStyle(!0,!0)))};q.prototype.ellipse=function(Z,da,qa,va){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(Z+
-qa/2,da+va/2,qa,va,this.getStyle(!0,!0)))};q.prototype.roundrect=function(Z,da,qa,va,ja,sa){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(Z+ja,da),this.lineTo(Z+qa-ja,da),this.quadTo(Z+qa,da,Z+qa,da+sa),this.lineTo(Z+qa,da+va-sa),this.quadTo(Z+qa,da+va,Z+qa-ja,da+va),this.lineTo(Z+ja,da+va),this.quadTo(Z,da+va,Z,da+va-sa),this.lineTo(Z,da+sa),this.quadTo(Z,da,Z+ja,da))};q.prototype.drawPath=function(Z){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),
-Z)}catch(qa){}this.passThrough=!1}else if(null!=this.nextShape){for(var da in Z)this.nextShape.options[da]=Z[da];Z.stroke!=mxConstants.NONE&&null!=Z.stroke||delete this.nextShape.options.stroke;Z.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};q.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};q.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,
-arguments):this.drawPath(this.getStyle(!1,!0))};q.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};q.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=
-this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(Z){return new q(Z,Editor.createRoughCanvas(Z),this)};var E=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(Z){return this.outline||
-null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?E.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(Z):this.createRoughCanvas(Z)};var Q=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(Z,da,qa,va,ja){null!=Z.handJiggle&&Z.handJiggle.passThrough||Q.apply(this,arguments)};var Y=mxShape.prototype.paint;mxShape.prototype.paint=function(Z){var da=Z.addTolerance,qa=!0;null!=this.style&&(qa="1"==
-mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=Z.handJiggle&&Z.handJiggle.constructor==q&&!this.outline){Z.save();var va=this.fill,ja=this.stroke;this.stroke=this.fill=null;var sa=this.configurePointerEvents,ya=Z.setStrokeColor;Z.setStrokeColor=function(){};var Aa=Z.setFillColor;Z.setFillColor=function(){};qa||null==va||(this.configurePointerEvents=function(){});Z.handJiggle.passThrough=!0;Y.apply(this,arguments);Z.handJiggle.passThrough=!1;Z.setFillColor=Aa;Z.setStrokeColor=
-ya;this.configurePointerEvents=sa;this.stroke=ja;this.fill=va;Z.restore();qa&&null!=va&&(Z.addTolerance=function(){})}Y.apply(this,arguments);Z.addTolerance=da};var R=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(Z,da,qa,va,ja,sa){null!=Z.handJiggle&&Z.handJiggle.constructor==q?(Z.handJiggle.passThrough=!0,R.apply(this,arguments),Z.handJiggle.passThrough=!1):R.apply(this,arguments)}})();Editor.fastCompress=function(q){return null==q||0==q.length||"undefined"===typeof pako?
-q:Graph.arrayBufferToString(pako.deflateRaw(q))};Editor.fastDecompress=function(q){return null==q||0==q.length||"undefined"===typeof pako?q:pako.inflateRaw(Graph.stringToArrayBuffer(atob(q)),{to:"string"})};Editor.extractGraphModel=function(q,E,Q){if(null!=q&&"undefined"!==typeof pako){var Y=q.ownerDocument.getElementsByTagName("div"),R=[];if(null!=Y&&0<Y.length)for(var Z=0;Z<Y.length;Z++)if("mxgraph"==Y[Z].getAttribute("class")){R.push(Y[Z]);break}0<R.length&&(Y=R[0].getAttribute("data-mxgraph"),
-null!=Y?(R=JSON.parse(Y),null!=R&&null!=R.xml&&(q=mxUtils.parseXml(R.xml),q=q.documentElement)):(R=R[0].getElementsByTagName("div"),0<R.length&&(Y=mxUtils.getTextContent(R[0]),Y=Graph.decompress(Y,null,Q),0<Y.length&&(q=mxUtils.parseXml(Y),q=q.documentElement))))}if(null!=q&&"svg"==q.nodeName)if(Y=q.getAttribute("content"),null!=Y&&"<"!=Y.charAt(0)&&"%"!=Y.charAt(0)&&(Y=unescape(window.atob?atob(Y):Base64.decode(cont,Y))),null!=Y&&"%"==Y.charAt(0)&&(Y=decodeURIComponent(Y)),null!=Y&&0<Y.length)q=
-mxUtils.parseXml(Y).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==q||E||(R=null,"diagram"==q.nodeName?R=q:"mxfile"==q.nodeName&&(Y=q.getElementsByTagName("diagram"),0<Y.length&&(R=Y[Math.max(0,Math.min(Y.length-1,urlParams.page||0))])),null!=R&&(q=Editor.parseDiagramNode(R,Q)));null==q||"mxGraphModel"==q.nodeName||E&&"mxfile"==q.nodeName||(q=null);return q};Editor.parseDiagramNode=function(q,E){var Q=mxUtils.trim(mxUtils.getTextContent(q)),Y=null;0<Q.length?(q=Graph.decompress(Q,
-null,E),null!=q&&0<q.length&&(Y=mxUtils.parseXml(q).documentElement)):(q=mxUtils.getChildNodes(q),0<q.length&&(Y=mxUtils.createXmlDocument(),Y.appendChild(Y.importNode(q[0],!0)),Y=Y.documentElement));return Y};Editor.getDiagramNodeXml=function(q){var E=mxUtils.getTextContent(q),Q=null;0<E.length?Q=Graph.decompress(E):null!=q.firstChild&&(Q=mxUtils.getXml(q.firstChild));return Q};Editor.extractGraphModelFromPdf=function(q){q=q.substring(q.indexOf(",")+1);q=window.atob&&!mxClient.IS_SF?atob(q):Base64.decode(q,
-!0);if("%PDF-1.7"==q.substring(0,8)){var E=q.indexOf("EmbeddedFile");if(-1<E){var Q=q.indexOf("stream",E)+9;if(0<q.substring(E,Q).indexOf("application#2Fvnd.jgraph.mxfile"))return E=q.indexOf("endstream",Q-1),pako.inflateRaw(Graph.stringToArrayBuffer(q.substring(Q,E)),{to:"string"})}return null}Q=null;E="";for(var Y=0,R=0,Z=[],da=null;R<q.length;){var qa=q.charCodeAt(R);R+=1;10!=qa&&(E+=String.fromCharCode(qa));qa=="/Subject (%3Cmxfile".charCodeAt(Y)?Y++:Y=0;if(19==Y){var va=q.indexOf("%3C%2Fmxfile%3E)",
-R)+15;R-=9;if(va>R){Q=q.substring(R,va);break}}10==qa&&("endobj"==E?da=null:"obj"==E.substring(E.length-3,E.length)||"xref"==E||"trailer"==E?(da=[],Z[E.split(" ")[0]]=da):null!=da&&da.push(E),E="")}null==Q&&(Q=Editor.extractGraphModelFromXref(Z));null!=Q&&(Q=decodeURIComponent(Q.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return Q};Editor.extractGraphModelFromXref=function(q){var E=q.trailer,Q=null;null!=E&&(E=/.* \/Info (\d+) (\d+) R/g.exec(E.join("\n")),null!=E&&0<E.length&&(E=q[E[1]],null!=E&&
-(E=/.* \/Subject (\d+) (\d+) R/g.exec(E.join("\n")),null!=E&&0<E.length&&(q=q[E[1]],null!=q&&(q=q.join("\n"),Q=q.substring(1,q.length-1))))));return Q};Editor.extractParserError=function(q,E){var Q=null;q=null!=q?q.getElementsByTagName("parsererror"):null;null!=q&&0<q.length&&(Q=E||mxResources.get("invalidChars"),E=q[0].getElementsByTagName("div"),0<E.length&&(Q=mxUtils.getTextContent(E[0])));return null!=Q?mxUtils.trim(Q):Q};Editor.addRetryToError=function(q,E){null!=q&&(q=null!=q.error?q.error:
-q,null==q.retry&&(q.retry=E))};Editor.configure=function(q){if(null!=q){Editor.config=q;Editor.configVersion=q.version;Menus.prototype.defaultFonts=q.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=q.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=q.defaultColors||ColorDialog.prototype.defaultColors;ColorDialog.prototype.colorNames=q.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=q.defaultColorSchemes||
-StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=q.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=q.autosaveDelay||DrawioFile.prototype.autosaveDelay;q.debug&&(urlParams.test="1");null!=q.templateFile&&(EditorUi.templateFile=q.templateFile);null!=q.styles&&(Array.isArray(q.styles)?Editor.styles=q.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=q.globalVars&&(Editor.globalVars=q.globalVars);null!=
-q.compressXml&&(Editor.compressXml=q.compressXml);null!=q.includeDiagram&&(Editor.defaultIncludeDiagram=q.includeDiagram);null!=q.simpleLabels&&(Editor.simpleLabels=q.simpleLabels);null!=q.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=q.oneDriveInlinePicker);null!=q.darkColor&&(Editor.darkColor=q.darkColor);null!=q.lightColor&&(Editor.lightColor=q.lightColor);null!=q.settingsName&&(Editor.configurationKey="."+q.settingsName+"-configuration",Editor.settingsKey="."+q.settingsName+"-config",mxSettings.key=
-Editor.settingsKey);q.customFonts&&(Menus.prototype.defaultFonts=q.customFonts.concat(Menus.prototype.defaultFonts));q.customPresetColors&&(ColorDialog.prototype.presetColors=q.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=q.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=q.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=q.css){var E=document.createElement("style");E.setAttribute("type","text/css");E.appendChild(document.createTextNode(q.css));
-var Q=document.getElementsByTagName("script")[0];Q.parentNode.insertBefore(E,Q)}null!=q.libraries&&(Sidebar.prototype.customEntries=q.libraries);null!=q.enabledLibraries&&(Array.isArray(q.enabledLibraries)?Sidebar.prototype.enabledLibraries=q.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=q.defaultLibraries&&(Sidebar.prototype.defaultEntries=q.defaultLibraries);null!=q.defaultCustomLibraries&&(Editor.defaultCustomLibraries=q.defaultCustomLibraries);
-null!=q.enableCustomLibraries&&(Editor.enableCustomLibraries=q.enableCustomLibraries);null!=q.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=q.defaultVertexStyle);null!=q.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=q.defaultEdgeStyle);null!=q.defaultPageVisible&&(Graph.prototype.defaultPageVisible=q.defaultPageVisible);null!=q.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=q.defaultGridEnabled);null!=q.zoomWheel&&(Graph.zoomWheel=q.zoomWheel);null!=q.zoomFactor&&(E=parseFloat(q.zoomFactor),
-!isNaN(E)&&1<E?Graph.prototype.zoomFactor=E:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=q.gridSteps&&(E=parseInt(q.gridSteps),!isNaN(E)&&0<E?mxGraphView.prototype.gridSteps=E:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));null!=q.pageFormat&&(E=parseInt(q.pageFormat.width),Q=parseInt(q.pageFormat.height),!isNaN(E)&&0<E&&!isNaN(Q)&&0<Q?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,E,Q),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):
-EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));q.thumbWidth&&(Sidebar.prototype.thumbWidth=q.thumbWidth);q.thumbHeight&&(Sidebar.prototype.thumbHeight=q.thumbHeight);q.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=q.emptyLibraryXml);q.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=q.emptyDiagramXml);q.sidebarWidth&&(EditorUi.prototype.hsplitPosition=q.sidebarWidth);q.sidebarTitles&&(Sidebar.prototype.sidebarTitles=q.sidebarTitles);q.sidebarTitleSize&&
-(E=parseInt(q.sidebarTitleSize),!isNaN(E)&&0<E?Sidebar.prototype.sidebarTitleSize=E:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));q.fontCss&&("string"===typeof q.fontCss?Editor.configureFontCss(q.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=q.autosaveDelay&&(E=parseInt(q.autosaveDelay),!isNaN(E)&&0<E?DrawioFile.prototype.autosaveDelay=E:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));null!=q.maxImageBytes&&
-(EditorUi.prototype.maxImageBytes=q.maxImageBytes);null!=q.maxImageSize&&(EditorUi.prototype.maxImageSize=q.maxImageSize);null!=q.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=q.shareCursorPosition);null!=q.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=q.showRemoteCursors)}};Editor.configureFontCss=function(q){if(null!=q){Editor.prototype.fontCss=q;var E=document.getElementsByTagName("script")[0];if(null!=E&&null!=E.parentNode){var Q=document.createElement("style");Q.setAttribute("type",
-"text/css");Q.appendChild(document.createTextNode(q));E.parentNode.insertBefore(Q,E);q=q.split("url(");for(Q=1;Q<q.length;Q++){var Y=q[Q].indexOf(")");Y=Editor.trimCssUrl(q[Q].substring(0,Y));var R=document.createElement("link");R.setAttribute("rel","preload");R.setAttribute("href",Y);R.setAttribute("as","font");R.setAttribute("crossorigin","");E.parentNode.insertBefore(R,E)}}}};Editor.trimCssUrl=function(q){return q.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS=
-"https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(q){q=null!=q?q:Editor.GUID_LENGTH;for(var E=[],Q=0;Q<q;Q++)E.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return E.join("")};Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=
-!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(q){q=null!=q&&"mxlibrary"!=q.nodeName?this.extractGraphModel(q):null;if(null!=q){var E=Editor.extractParserError(q,mxResources.get("invalidOrMissingFile"));if(E)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[q],"cause",[E]),Error(mxResources.get("notADiagramFile")+" ("+E+")");if("mxGraphModel"==q.nodeName){E=q.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=E&&""!=
-E)E!=this.graph.currentStyle&&(Q=null!=this.graph.themes?this.graph.themes[E]:mxUtils.load(STYLE_PATH+"/"+E+".xml").getDocumentElement(),null!=Q&&(Y=new mxCodec(Q.ownerDocument),Y.decode(Q,this.graph.getStylesheet())));else{var Q=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=Q){var Y=new mxCodec(Q.ownerDocument);Y.decode(Q,this.graph.getStylesheet())}}this.graph.currentStyle=E;this.graph.mathEnabled="1"==urlParams.math||
-"1"==q.getAttribute("math");E=q.getAttribute("backgroundImage");null!=E?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(E)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==q.getAttribute("shadow"),!1);if(E=q.getAttribute("extFonts"))try{for(E=E.split("|").map(function(R){R=R.split("^");return{name:R[0],url:R[1]}}),Q=0;Q<E.length;Q++)this.graph.addExtFont(E[Q].name,
-E[Q].url)}catch(R){console.log("ExtFonts format error: "+R.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(q,E){q=null!=q?q:!0;var Q=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&Q.setAttribute("style",
-this.graph.currentStyle);var Y=this.graph.getBackgroundImageObject(this.graph.backgroundImage,E);null!=Y&&Q.setAttribute("backgroundImage",JSON.stringify(Y));Q.setAttribute("math",this.graph.mathEnabled?"1":"0");Q.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(Y=this.graph.extFonts.map(function(R){return R.name+"^"+R.url}),Q.setAttribute("extFonts",Y.join("|")));return Q};Editor.prototype.isDataSvg=function(q){try{var E=mxUtils.parseXml(q).documentElement.getAttribute("content");
-if(null!=E&&(null!=E&&"<"!=E.charAt(0)&&"%"!=E.charAt(0)&&(E=unescape(window.atob?atob(E):Base64.decode(cont,E))),null!=E&&"%"==E.charAt(0)&&(E=decodeURIComponent(E)),null!=E&&0<E.length)){var Q=mxUtils.parseXml(E).documentElement;return"mxfile"==Q.nodeName||"mxGraphModel"==Q.nodeName}}catch(Y){}return!1};Editor.prototype.extractGraphModel=function(q,E,Q){return Editor.extractGraphModel.apply(this,arguments)};var k=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled=
-"1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();k.apply(this,arguments)};var 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(q,E){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){q=null!=q?q:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(R){try{MathJax.typesetClear([R]),MathJax.typeset([R]),Editor.onMathJaxDone()}catch(Z){MathJax.typesetClear([R]),null!=Z.retry?Z.retry.then(function(){MathJax.typesetPromise([R]).then(Editor.onMathJaxDone)}):null!=window.console&&console.log("Error in MathJax: "+Z.toString())}};window.MathJax=null!=E?E:{options:{skipHtmlTags:{"[+]":["text"]}},
-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.MathJaxClear=function(){Editor.mathJaxQueue=[]};Editor.onMathJaxDone=function(){};var Q=Editor.prototype.init;
-Editor.prototype.init=function(){Q.apply(this,arguments);var R=mxUtils.bind(this,function(Z,da){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,R);this.graph.addListener(mxEvent.REFRESH,R)};E=document.getElementsByTagName("script");if(null!=E&&0<E.length){var Y=document.createElement("script");Y.setAttribute("type","text/javascript");Y.setAttribute("src",q);E[0].parentNode.appendChild(Y)}}};
-Editor.prototype.csvToArray=function(q){if(0<q.length){var E="",Q=[""],Y=0,R=!0,Z;q=$jscomp.makeIterator(q);for(Z=q.next();!Z.done;Z=q.next())Z=Z.value,'"'===Z?(R&&Z===E&&(Q[Y]+=Z),R=!R):","===Z&&R?Z=Q[++Y]="":Q[Y]+=Z,E=Z;return Q}return[]};Editor.prototype.getProxiedUrl=function(q){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(q)){var E=/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q);E=/\.png$/i.test(q)||
-/\.pdf$/i.test(q)||E;var Q="t="+(new Date).getTime();q=PROXY_URL+"?url="+encodeURIComponent(q)+"&"+Q+(E?"&base64=1":"")}return q};Editor.prototype.isCorsEnabledForUrl=function(q){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||q.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(q)||"https://raw.githubusercontent.com/"===
-q.substring(0,34)||"https://fonts.googleapis.com/"===q.substring(0,29)||"https://fonts.gstatic.com/"===q.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var q=new mxUrlConverter;q.updateBaseUrl();var E=q.convert,Q=this;q.convert=function(Y){if(null!=Y){var R="http://"==Y.substring(0,7)||"https://"==Y.substring(0,8);R&&!navigator.onLine?Y=Editor.svgBrokenImage.src:!R||Y.substring(0,q.baseUrl.length)==q.baseUrl||Q.crossOriginImages&&Q.isCorsEnabledForUrl(Y)?"chrome-extension://"==
-Y.substring(0,19)||mxClient.IS_CHROMEAPP||(Y=E.apply(this,arguments)):Y=PROXY_URL+"?url="+encodeURIComponent(Y)}return Y};return q};Editor.createSvgDataUri=function(q){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(q)))};Editor.prototype.convertImageToDataUri=function(q,E){try{var Q=!0,Y=window.setTimeout(mxUtils.bind(this,function(){Q=!1;E(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(q))mxUtils.get(q,mxUtils.bind(this,function(Z){window.clearTimeout(Y);Q&&E(Editor.createSvgDataUri(Z.getText()))}),
-function(){window.clearTimeout(Y);Q&&E(Editor.svgBrokenImage.src)});else{var R=new Image;this.crossOriginImages&&(R.crossOrigin="anonymous");R.onload=function(){window.clearTimeout(Y);if(Q)try{var Z=document.createElement("canvas"),da=Z.getContext("2d");Z.height=R.height;Z.width=R.width;da.drawImage(R,0,0);E(Z.toDataURL())}catch(qa){E(Editor.svgBrokenImage.src)}};R.onerror=function(){window.clearTimeout(Y);Q&&E(Editor.svgBrokenImage.src)};R.src=q}}catch(Z){E(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=
-function(q,E,Q,Y){null==Y&&(Y=this.createImageUrlConverter());var R=0,Z=Q||{};Q=mxUtils.bind(this,function(da,qa){da=q.getElementsByTagName(da);for(var va=0;va<da.length;va++)mxUtils.bind(this,function(ja){try{if(null!=ja){var sa=Y.convert(ja.getAttribute(qa));if(null!=sa&&"data:"!=sa.substring(0,5)){var ya=Z[sa];null==ya?(R++,this.convertImageToDataUri(sa,function(Aa){null!=Aa&&(Z[sa]=Aa,ja.setAttribute(qa,Aa));R--;0==R&&E(q)})):ja.setAttribute(qa,ya)}else null!=sa&&ja.setAttribute(qa,sa)}}catch(Aa){}})(da[va])});
-Q("image","xlink:href");Q("img","src");0==R&&E(q)};Editor.base64Encode=function(q){for(var E="",Q=0,Y=q.length,R,Z,da;Q<Y;){R=q.charCodeAt(Q++)&255;if(Q==Y){E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R>>2);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&3)<<4);E+="==";break}Z=q.charCodeAt(Q++);if(Q==Y){E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R>>2);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&
-3)<<4|(Z&240)>>4);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Z&15)<<2);E+="=";break}da=q.charCodeAt(Q++);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R>>2);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&3)<<4|(Z&240)>>4);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Z&15)<<2|(da&192)>>6);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(da&
-63)}return E};Editor.prototype.loadUrl=function(q,E,Q,Y,R,Z,da,qa){try{var va=!da&&(Y||/(\.png)($|\?)/i.test(q)||/(\.jpe?g)($|\?)/i.test(q)||/(\.gif)($|\?)/i.test(q)||/(\.pdf)($|\?)/i.test(q));R=null!=R?R:!0;var ja=mxUtils.bind(this,function(){mxUtils.get(q,mxUtils.bind(this,function(sa){if(200<=sa.getStatus()&&299>=sa.getStatus()){if(null!=E){var ya=sa.getText();if(va){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){sa=mxUtilsBinaryToArray(sa.request.responseBody).toArray();
-ya=Array(sa.length);for(var Aa=0;Aa<sa.length;Aa++)ya[Aa]=String.fromCharCode(sa[Aa]);ya=ya.join("")}Z=null!=Z?Z:"data:image/png;base64,";ya=Z+Editor.base64Encode(ya)}E(ya)}}else null!=Q&&(0==sa.getStatus()?Q({message:mxResources.get("accessDenied")},sa):404==sa.getStatus()?Q({code:sa.getStatus()},sa):Q({message:mxResources.get("error")+" "+sa.getStatus()},sa))}),function(sa){null!=Q&&Q({message:mxResources.get("error")+" "+sa.getStatus()})},va,this.timeout,function(){R&&null!=Q&&Q({code:App.ERROR_TIMEOUT,
-retry:ja})},qa)});ja()}catch(sa){null!=Q&&Q(sa)}};Editor.prototype.absoluteCssFonts=function(q){var E=null;if(null!=q){var Q=q.split("url(");if(0<Q.length){E=[Q[0]];q=window.location.pathname;var Y=null!=q?q.lastIndexOf("/"):-1;0<=Y&&(q=q.substring(0,Y+1));Y=document.getElementsByTagName("base");var R=null;null!=Y&&0<Y.length&&(R=Y[0].getAttribute("href"));for(var Z=1;Z<Q.length;Z++)if(Y=Q[Z].indexOf(")"),0<Y){var da=Editor.trimCssUrl(Q[Z].substring(0,Y));this.graph.isRelativeUrl(da)&&(da=null!=R?
-R+da:window.location.protocol+"//"+window.location.hostname+("/"==da.charAt(0)?"":q)+da);E.push('url("'+da+'"'+Q[Z].substring(Y))}else E.push(Q[Z])}else E=[q]}return null!=E?E.join(""):null};Editor.prototype.mapFontUrl=function(q,E,Q){/^https?:\/\//.test(E)&&!this.isCorsEnabledForUrl(E)&&(E=PROXY_URL+"?url="+encodeURIComponent(E));Q(q,E)};Editor.prototype.embedCssFonts=function(q,E){var Q=q.split("url("),Y=0;null==this.cachedFonts&&(this.cachedFonts={});var R=mxUtils.bind(this,function(){if(0==Y){for(var va=
-[Q[0]],ja=1;ja<Q.length;ja++){var sa=Q[ja].indexOf(")");va.push('url("');va.push(this.cachedFonts[Editor.trimCssUrl(Q[ja].substring(0,sa))]);va.push('"'+Q[ja].substring(sa))}E(va.join(""))}});if(0<Q.length){for(q=1;q<Q.length;q++){var Z=Q[q].indexOf(")"),da=null,qa=Q[q].indexOf("format(",Z);0<qa&&(da=Editor.trimCssUrl(Q[q].substring(qa+7,Q[q].indexOf(")",qa))));mxUtils.bind(this,function(va){if(null==this.cachedFonts[va]){this.cachedFonts[va]=va;Y++;var ja="application/x-font-ttf";if("svg"==da||/(\.svg)($|\?)/i.test(va))ja=
-"image/svg+xml";else if("otf"==da||"embedded-opentype"==da||/(\.otf)($|\?)/i.test(va))ja="application/x-font-opentype";else if("woff"==da||/(\.woff)($|\?)/i.test(va))ja="application/font-woff";else if("woff2"==da||/(\.woff2)($|\?)/i.test(va))ja="application/font-woff2";else if("eot"==da||/(\.eot)($|\?)/i.test(va))ja="application/vnd.ms-fontobject";else if("sfnt"==da||/(\.sfnt)($|\?)/i.test(va))ja="application/font-sfnt";this.mapFontUrl(ja,va,mxUtils.bind(this,function(sa,ya){this.loadUrl(ya,mxUtils.bind(this,
-function(Aa){this.cachedFonts[va]=Aa;Y--;R()}),mxUtils.bind(this,function(Aa){Y--;R()}),!0,null,"data:"+sa+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(Q[q].substring(0,Z)),da)}R()}else E(q)};Editor.prototype.loadFonts=function(q){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(E){this.resolvedFontCss=E;null!=q&&q()})):null!=q&&q()};Editor.prototype.createGoogleFontCache=function(){var q={},E;for(E in Graph.fontMapping)Graph.isCssFontUrl(E)&&
-(q[E]=Graph.fontMapping[E]);return q};Editor.prototype.embedExtFonts=function(q){var E=this.graph.getCustomFonts();if(0<E.length){var Q=[],Y=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var R=mxUtils.bind(this,function(){0==Y&&this.embedCssFonts(Q.join(""),q)}),Z=0;Z<E.length;Z++)mxUtils.bind(this,function(da,qa){Graph.isCssFontUrl(qa)?null==this.cachedGoogleFonts[qa]?(Y++,this.loadUrl(qa,mxUtils.bind(this,function(va){this.cachedGoogleFonts[qa]=va;Q.push(va+
-"\n");Y--;R()}),mxUtils.bind(this,function(va){Y--;Q.push("@import url("+qa+");\n");R()}))):Q.push(this.cachedGoogleFonts[qa]+"\n"):Q.push('@font-face {font-family: "'+da+'";src: url("'+qa+'")}\n')})(E[Z].name,E[Z].url);R()}else q()};Editor.prototype.addMathCss=function(q){q=q.getElementsByTagName("defs");if(null!=q&&0<q.length)for(var E=document.getElementsByTagName("style"),Q=0;Q<E.length;Q++){var Y=mxUtils.getTextContent(E[Q]);0>Y.indexOf("mxPageSelector")&&0<Y.indexOf("MathJax")&&q[0].appendChild(E[Q].cloneNode(!0))}};
-Editor.prototype.addFontCss=function(q,E){E=null!=E?E:this.absoluteCssFonts(this.fontCss);if(null!=E){var Q=q.getElementsByTagName("defs"),Y=q.ownerDocument;0==Q.length?(Q=null!=Y.createElementNS?Y.createElementNS(mxConstants.NS_SVG,"defs"):Y.createElement("defs"),null!=q.firstChild?q.insertBefore(Q,q.firstChild):q.appendChild(Q)):Q=Q[0];q=null!=Y.createElementNS?Y.createElementNS(mxConstants.NS_SVG,"style"):Y.createElement("style");q.setAttribute("type","text/css");mxUtils.setTextContent(q,E);Q.appendChild(q)}};
-Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(q,E,Q){var Y=mxClient.IS_FF?8192:16384;return Math.min(Q,Math.min(Y/q,Y/E))};Editor.prototype.exportToCanvas=function(q,E,Q,Y,R,Z,da,qa,va,ja,sa,ya,Aa,Ea,za,Ia,Ca,Sa){try{Z=null!=Z?Z:!0;da=null!=da?da:!0;ya=null!=ya?ya:this.graph;Aa=null!=Aa?Aa:0;var Pa=va?null:ya.background;Pa==mxConstants.NONE&&(Pa=null);null==Pa&&(Pa=Y);null==Pa&&0==va&&(Pa=Ia?this.graph.defaultPageBackgroundColor:
-"#ffffff");this.convertImages(ya.getSvg(null,null,Aa,Ea,null,da,null,null,null,ja,null,Ia,Ca,Sa),mxUtils.bind(this,function(Ta){try{var Za=new Image;Za.onload=mxUtils.bind(this,function(){try{var z=function(){mxClient.IS_SF?window.setTimeout(function(){W.drawImage(Za,0,0);q(J,Ta)},0):(W.drawImage(Za,0,0),q(J,Ta))},J=document.createElement("canvas"),O=parseInt(Ta.getAttribute("width")),U=parseInt(Ta.getAttribute("height"));qa=null!=qa?qa:1;null!=E&&(qa=Z?Math.min(1,Math.min(3*E/(4*U),E/O)):E/O);qa=
-this.getMaxCanvasScale(O,U,qa);O=Math.ceil(qa*O);U=Math.ceil(qa*U);J.setAttribute("width",O);J.setAttribute("height",U);var W=J.getContext("2d");null!=Pa&&(W.beginPath(),W.rect(0,0,O,U),W.fillStyle=Pa,W.fill());1!=qa&&W.scale(qa,qa);if(za){var ea=ya.view,ka=ea.scale;ea.scale=1;var xa=btoa(unescape(encodeURIComponent(ea.createSvgGrid(ea.gridColor))));ea.scale=ka;xa="data:image/svg+xml;base64,"+xa;var ta=ya.gridSize*ea.gridSteps*qa,pa=ya.getGraphBounds(),ua=ea.translate.x*ka,Da=ea.translate.y*ka,Fa=
-ua+(pa.x-ua)/ka-Aa,Ma=Da+(pa.y-Da)/ka-Aa,Qa=new Image;Qa.onload=function(){try{for(var Ba=-Math.round(ta-mxUtils.mod((ua-Fa)*qa,ta)),Ka=-Math.round(ta-mxUtils.mod((Da-Ma)*qa,ta));Ba<O;Ba+=ta)for(var Oa=Ka;Oa<U;Oa+=ta)W.drawImage(Qa,Ba/qa,Oa/qa);z()}catch(Ya){null!=R&&R(Ya)}};Qa.onerror=function(Ba){null!=R&&R(Ba)};Qa.src=xa}else z()}catch(Ba){null!=R&&R(Ba)}});Za.onerror=function(z){null!=R&&R(z)};ja&&this.graph.addSvgShadow(Ta);this.graph.mathEnabled&&this.addMathCss(Ta);var Na=mxUtils.bind(this,
-function(){try{null!=this.resolvedFontCss&&this.addFontCss(Ta,this.resolvedFontCss),Za.src=Editor.createSvgDataUri(mxUtils.getXml(Ta))}catch(z){null!=R&&R(z)}});this.embedExtFonts(mxUtils.bind(this,function(z){try{null!=z&&this.addFontCss(Ta,z),this.loadFonts(Na)}catch(J){null!=R&&R(J)}}))}catch(z){null!=R&&R(z)}}),Q,sa)}catch(Ta){null!=R&&R(Ta)}};Editor.crcTable=[];for(var C=0;256>C;C++)for(var p=C,F=0;8>F;F++)p=1==(p&1)?3988292384^p>>>1:p>>>1,Editor.crcTable[C]=p;Editor.updateCRC=function(q,E,Q,
-Y){for(var R=0;R<Y;R++)q=Editor.crcTable[(q^E.charCodeAt(Q+R))&255]^q>>>8;return q};Editor.crc32=function(q){for(var E=-1,Q=0;Q<q.length;Q++)E=E>>>8^Editor.crcTable[(E^q.charCodeAt(Q))&255];return(E^-1)>>>0};Editor.writeGraphModelToPng=function(q,E,Q,Y,R){function Z(sa,ya){var Aa=va;va+=ya;return sa.substring(Aa,va)}function da(sa){sa=Z(sa,4);return sa.charCodeAt(3)+(sa.charCodeAt(2)<<8)+(sa.charCodeAt(1)<<16)+(sa.charCodeAt(0)<<24)}function qa(sa){return String.fromCharCode(sa>>24&255,sa>>16&255,
-sa>>8&255,sa&255)}q=q.substring(q.indexOf(",")+1);q=window.atob?atob(q):Base64.decode(q,!0);var va=0;if(Z(q,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=R&&R();else if(Z(q,4),"IHDR"!=Z(q,4))null!=R&&R();else{Z(q,17);R=q.substring(0,va);do{var ja=da(q);if("IDAT"==Z(q,4)){R=q.substring(0,va-8);"pHYs"==E&&"dpi"==Q?(Q=Math.round(Y/.0254),Q=qa(Q)+qa(Q)+String.fromCharCode(1)):Q=Q+String.fromCharCode(0)+("zTXt"==E?String.fromCharCode(0):"")+Y;Y=4294967295;Y=Editor.updateCRC(Y,
-E,0,4);Y=Editor.updateCRC(Y,Q,0,Q.length);R+=qa(Q.length)+E+Q+qa(Y^4294967295);R+=q.substring(va-8,q.length);break}R+=q.substring(va-8,va-4+ja);Z(q,ja);Z(q,4)}while(ja);return"data:image/png;base64,"+(window.btoa?btoa(R):Base64.encode(R,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var L=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(q,E){L.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);
-mxSettings.save()};var P=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){P.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(q,E){var Q=null;null!=q.editor.graph.getModel().getParent(E)?Q=E.getId():null!=q.currentPage&&(Q=q.currentPage.getId());return Q});if(null!=window.StyleFormatPanel){var d=Format.prototype.init;Format.prototype.init=function(){d.apply(this,arguments);
-this.editorUi.editor.addListener("fileLoaded",this.update)};var f=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?f.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var q=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=q&&q.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(q){return!1};var g=DiagramFormatPanel.prototype.addView;
-DiagramFormatPanel.prototype.addView=function(q){q=g.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var E=this.editorUi,Q=E.editor.graph,Y=this.createOption(mxResources.get("shadow"),function(){return Q.shadowVisible},function(R){var Z=new ChangePageSetup(E);Z.ignoreColor=!0;Z.ignoreImage=!0;Z.shadowVisible=R;Q.model.execute(Z)},{install:function(R){this.listener=function(){R(Q.shadowVisible)};E.addListener("shadowVisibleChanged",this.listener)},
-destroy:function(){E.removeListener(this.listener)}});Editor.enableShadowOption||(Y.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(Y,60));q.appendChild(Y)}return q};var x=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(q){q=x.apply(this,arguments);var E=this.editorUi,Q=E.editor.graph;if(Q.isEnabled()){var Y=E.getCurrentFile();if(null!=Y&&Y.isAutosaveOptional()){var R=this.createOption(mxResources.get("autosave"),function(){return E.editor.autosave},
-function(da){E.editor.setAutosave(da);E.editor.autosave&&Y.isModified()&&Y.fileChanged()},{install:function(da){this.listener=function(){da(E.editor.autosave)};E.editor.addListener("autosaveChanged",this.listener)},destroy:function(){E.editor.removeListener(this.listener)}});q.appendChild(R)}}if(this.isMathOptionVisible()&&Q.isEnabled()&&"undefined"!==typeof MathJax){R=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return Q.mathEnabled},function(da){E.actions.get("mathematicalTypesetting").funct()},
-{install:function(da){this.listener=function(){da(Q.mathEnabled)};E.addListener("mathEnabledChanged",this.listener)},destroy:function(){E.removeListener(this.listener)}});R.style.paddingTop="5px";q.appendChild(R);var Z=E.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");Z.style.position="relative";Z.style.marginLeft="6px";Z.style.top="2px";R.appendChild(Z)}return q};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",
-type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,
-defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",
-dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",
-min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",
-type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",dispName:"Left Line",type:"float",min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.cube.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.step.prototype.customProperties=
-[{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20},{name:"fixedSize",dispName:"Fixed Size",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.trapezoid.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.tape.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.4}];mxCellRenderer.defaultShapes.note.prototype.customProperties=
-[{name:"size",dispName:"Fold Size",type:"float",min:0,defVal:30},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.card.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Cutoff Size",type:"float",min:0,defVal:30}];mxCellRenderer.defaultShapes.callout.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
-{name:"base",dispName:"Callout Width",type:"float",min:0,defVal:20},{name:"size",dispName:"Callout Length",type:"float",min:0,defVal:30},{name:"position",dispName:"Callout Position",type:"float",min:0,max:1,defVal:.5},{name:"position2",dispName:"Callout Tip Position",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.folder.prototype.customProperties=[{name:"tabWidth",dispName:"Tab Width",type:"float"},{name:"tabHeight",dispName:"Tab Height",type:"float"},{name:"tabPosition",dispName:"Tap Position",
-type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"right",dispName:"Right"}]}];mxCellRenderer.defaultShapes.swimlane.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"startSize",dispName:"Header Size",type:"float"},{name:"swimlaneHead",dispName:"Head Border",type:"bool",defVal:!0},{name:"swimlaneBody",dispName:"Body Border",type:"bool",defVal:!0},{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},{name:"separatorColor",dispName:"Separator Color",
-type:"color",defVal:null}];mxCellRenderer.defaultShapes.table.prototype.customProperties=[{name:"rowLines",dispName:"Row Lines",type:"bool",defVal:!0},{name:"columnLines",dispName:"Column Lines",type:"bool",defVal:!0},{name:"fixedRows",dispName:"Fixed Rows",type:"bool",defVal:!1},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",defVal:!1},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",defVal:!1}].concat(mxCellRenderer.defaultShapes.swimlane.prototype.customProperties).concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);
-mxCellRenderer.defaultShapes.tableRow.prototype.customProperties=mxCellRenderer.defaultShapes.swimlane.prototype.customProperties.concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);mxCellRenderer.defaultShapes.doubleEllipse.prototype.customProperties=[{name:"margin",dispName:"Indent",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.ext.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"double",dispName:"Double",
-type:"bool",defVal:!1},{name:"margin",dispName:"Indent",type:"float",min:0,defVal:0}];mxCellRenderer.defaultShapes.curlyBracket.prototype.customProperties=[{name:"rounded",dispName:"Rounded",type:"bool",defVal:!0},{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.image.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.label.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",
-type:"bool",defVal:!0},{name:"imageAlign",dispName:"Image Align",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"center",dispName:"Center"},{val:"right",dispName:"Right"}],defVal:"left"},{name:"imageVerticalAlign",dispName:"Image Vertical Align",type:"enum",enumList:[{val:"top",dispName:"Top"},{val:"middle",dispName:"Middle"},{val:"bottom",dispName:"Bottom"}],defVal:"middle"},{name:"imageWidth",dispName:"Image Width",type:"float",min:0,defVal:24},{name:"imageHeight",dispName:"Image Height",
-type:"float",min:0,defVal:24},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:12},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.dataStorage.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.1}];mxCellRenderer.defaultShapes.manualInput.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:30},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.loopLimit.prototype.customProperties=
-[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:38},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.display.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.singleArrow.prototype.customProperties=
-[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.doubleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.cross.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,
-max:1,defVal:.2}];mxCellRenderer.defaultShapes.corner.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.tee.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.umlLifeline.prototype.customProperties=[{name:"participant",dispName:"Participant",type:"enum",
-defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName:"Actor"},{val:"umlBoundary",dispName:"Boundary"},{val:"umlEntity",dispName:"Entity"},{val:"umlControl",dispName:"Control"}]},{name:"size",dispName:"Height",type:"float",defVal:40,min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name:"width",dispName:"Title Width",type:"float",defVal:60,min:0},{name:"height",dispName:"Title Height",type:"float",defVal:30,min:0}];StyleFormatPanel.prototype.defaultColorSchemes=
-[[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",font:"#333333"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",
-stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",
-font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},
-{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=
-function(q,E,Q){if(null!=E){var Y=function(Z){if(null!=Z)if(Q)for(var da=0;da<Z.length;da++)E[Z[da].name]=Z[da];else for(var qa in E){var va=!1;for(da=0;da<Z.length;da++)if(Z[da].name==qa&&Z[da].type==E[qa].type){va=!0;break}va||delete E[qa]}},R=this.editorUi.editor.graph.view.getState(q);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)),Y(R.shape.customProperties));q=q.getAttribute("customProperties");if(null!=q)try{Y(JSON.parse(q))}catch(Z){}}};var y=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var q=this.editorUi.getSelectionState();"image"!=q.style.shape&&!q.containsLabel&&0<q.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));y.apply(this,arguments);if(Editor.enableCustomProperties){for(var E=
-{},Q=q.vertices,Y=q.edges,R=0;R<Q.length;R++)this.findCommonProperties(Q[R],E,0==R);for(R=0;R<Y.length;R++)this.findCommonProperties(Y[R],E,0==Q.length&&0==R);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(E).length&&this.container.appendChild(this.addProperties(this.createPanel(),E,q))}};var t=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(q){this.addActions(q,["copyStyle","pasteStyle"]);return t.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=
-!0;StyleFormatPanel.prototype.addProperties=function(q,E,Q){function Y(W,ea,ka,xa){ya.getModel().beginUpdate();try{var ta=[],pa=[];if(null!=ka.index){for(var ua=[],Da=ka.parentRow.nextSibling;Da&&Da.getAttribute("data-pName")==W;)ua.push(Da.getAttribute("data-pValue")),Da=Da.nextSibling;ka.index<ua.length?null!=xa?ua.splice(xa,1):ua[ka.index]=ea:ua.push(ea);null!=ka.size&&ua.length>ka.size&&(ua=ua.slice(0,ka.size));ea=ua.join(",");null!=ka.countProperty&&(ya.setCellStyles(ka.countProperty,ua.length,
-ya.getSelectionCells()),ta.push(ka.countProperty),pa.push(ua.length))}ya.setCellStyles(W,ea,ya.getSelectionCells());ta.push(W);pa.push(ea);if(null!=ka.dependentProps)for(W=0;W<ka.dependentProps.length;W++){var Fa=ka.dependentPropsDefVal[W],Ma=ka.dependentPropsVals[W];if(Ma.length>ea)Ma=Ma.slice(0,ea);else for(var Qa=Ma.length;Qa<ea;Qa++)Ma.push(Fa);Ma=Ma.join(",");ya.setCellStyles(ka.dependentProps[W],Ma,ya.getSelectionCells());ta.push(ka.dependentProps[W]);pa.push(Ma)}if("function"==typeof ka.onChange)ka.onChange(ya,
-ea);sa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",ta,"values",pa,"cells",ya.getSelectionCells()))}finally{ya.getModel().endUpdate()}}function R(W,ea,ka){var xa=mxUtils.getOffset(q,!0),ta=mxUtils.getOffset(W,!0);ea.style.position="absolute";ea.style.left=ta.x-xa.x+"px";ea.style.top=ta.y-xa.y+"px";ea.style.width=W.offsetWidth+"px";ea.style.height=W.offsetHeight-(ka?4:0)+"px";ea.style.zIndex=5}function Z(W,ea,ka){var xa=document.createElement("div");xa.style.width="32px";xa.style.height=
-"4px";xa.style.margin="2px";xa.style.border="1px solid black";xa.style.background=ea&&"none"!=ea?ea:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(sa,function(ta){this.editorUi.pickColor(ea,function(pa){xa.style.background="none"==pa?"url('"+Dialog.prototype.noColorImage+"')":pa;Y(W,pa,ka)});mxEvent.consume(ta)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(xa);return btn}function da(W,ea,ka,xa,ta,pa,ua){null!=ea&&(ea=ea.split(","),
-Aa.push({name:W,values:ea,type:ka,defVal:xa,countProperty:ta,parentRow:pa,isDeletable:!0,flipBkg:ua}));btn=mxUtils.button("+",mxUtils.bind(sa,function(Da){for(var Fa=pa,Ma=0;null!=Fa.nextSibling;)if(Fa.nextSibling.getAttribute("data-pName")==W)Fa=Fa.nextSibling,Ma++;else break;var Qa={type:ka,parentRow:pa,index:Ma,isDeletable:!0,defVal:xa,countProperty:ta};Ma=ja(W,"",Qa,0==Ma%2,ua);Y(W,xa,Qa);Fa.parentNode.insertBefore(Ma,Fa.nextSibling);mxEvent.consume(Da)}));btn.style.height="16px";btn.style.width=
-"25px";btn.className="geColorBtn";return btn}function qa(W,ea,ka,xa,ta,pa,ua){if(0<ta){var Da=Array(ta);ea=null!=ea?ea.split(","):[];for(var Fa=0;Fa<ta;Fa++)Da[Fa]=null!=ea[Fa]?ea[Fa]:null!=xa?xa:"";Aa.push({name:W,values:Da,type:ka,defVal:xa,parentRow:pa,flipBkg:ua,size:ta})}return document.createElement("div")}function va(W,ea,ka){var xa=document.createElement("input");xa.type="checkbox";xa.checked="1"==ea;mxEvent.addListener(xa,"change",function(){Y(W,xa.checked?"1":"0",ka)});return xa}function ja(W,
-ea,ka,xa,ta){var pa=ka.dispName,ua=ka.type,Da=document.createElement("tr");Da.className="gePropRow"+(ta?"Dark":"")+(xa?"Alt":"")+" gePropNonHeaderRow";Da.setAttribute("data-pName",W);Da.setAttribute("data-pValue",ea);xa=!1;null!=ka.index&&(Da.setAttribute("data-index",ka.index),pa=(null!=pa?pa:"")+"["+ka.index+"]",xa=!0);var Fa=document.createElement("td");Fa.className="gePropRowCell";pa=mxResources.get(pa,null,pa);mxUtils.write(Fa,pa);Fa.setAttribute("title",pa);xa&&(Fa.style.textAlign="right");
-Da.appendChild(Fa);Fa=document.createElement("td");Fa.className="gePropRowCell";if("color"==ua)Fa.appendChild(Z(W,ea,ka));else if("bool"==ua||"boolean"==ua)Fa.appendChild(va(W,ea,ka));else if("enum"==ua){var Ma=ka.enumList;for(ta=0;ta<Ma.length;ta++)if(pa=Ma[ta],pa.val==ea){mxUtils.write(Fa,mxResources.get(pa.dispName,null,pa.dispName));break}mxEvent.addListener(Fa,"click",mxUtils.bind(sa,function(){var Qa=document.createElement("select");R(Fa,Qa);for(var Ba=0;Ba<Ma.length;Ba++){var Ka=Ma[Ba],Oa=
-document.createElement("option");Oa.value=mxUtils.htmlEntities(Ka.val);mxUtils.write(Oa,mxResources.get(Ka.dispName,null,Ka.dispName));Qa.appendChild(Oa)}Qa.value=ea;q.appendChild(Qa);mxEvent.addListener(Qa,"change",function(){var Ya=mxUtils.htmlEntities(Qa.value);Y(W,Ya,ka)});Qa.focus();mxEvent.addListener(Qa,"blur",function(){q.removeChild(Qa)})}))}else"dynamicArr"==ua?Fa.appendChild(da(W,ea,ka.subType,ka.subDefVal,ka.countProperty,Da,ta)):"staticArr"==ua?Fa.appendChild(qa(W,ea,ka.subType,ka.subDefVal,
-ka.size,Da,ta)):"readOnly"==ua?(ta=document.createElement("input"),ta.setAttribute("readonly",""),ta.value=ea,ta.style.width="96px",ta.style.borderWidth="0px",Fa.appendChild(ta)):(Fa.innerHTML=mxUtils.htmlEntities(decodeURIComponent(ea)),mxEvent.addListener(Fa,"click",mxUtils.bind(sa,function(){function Qa(){var Ka=Ba.value;Ka=0==Ka.length&&"string"!=ua?0:Ka;ka.allowAuto&&(null!=Ka.trim&&"auto"==Ka.trim().toLowerCase()?(Ka="auto",ua="string"):(Ka=parseFloat(Ka),Ka=isNaN(Ka)?0:Ka));null!=ka.min&&Ka<
-ka.min?Ka=ka.min:null!=ka.max&&Ka>ka.max&&(Ka=ka.max);Ka=encodeURIComponent(("int"==ua?parseInt(Ka):Ka)+"");Y(W,Ka,ka)}var Ba=document.createElement("input");R(Fa,Ba,!0);Ba.value=decodeURIComponent(ea);Ba.className="gePropEditor";"int"!=ua&&"float"!=ua||ka.allowAuto||(Ba.type="number",Ba.step="int"==ua?"1":"any",null!=ka.min&&(Ba.min=parseFloat(ka.min)),null!=ka.max&&(Ba.max=parseFloat(ka.max)));q.appendChild(Ba);mxEvent.addListener(Ba,"keypress",function(Ka){13==Ka.keyCode&&Qa()});Ba.focus();mxEvent.addListener(Ba,
-"blur",function(){Qa()})})));ka.isDeletable&&(ta=mxUtils.button("-",mxUtils.bind(sa,function(Qa){Y(W,"",ka,ka.index);mxEvent.consume(Qa)})),ta.style.height="16px",ta.style.width="25px",ta.style.float="right",ta.className="geColorBtn",Fa.appendChild(ta));Da.appendChild(Fa);return Da}var sa=this,ya=this.editorUi.editor.graph,Aa=[];q.style.position="relative";q.style.padding="0";var Ea=document.createElement("table");Ea.className="geProperties";Ea.style.whiteSpace="nowrap";Ea.style.width="100%";var za=
-document.createElement("tr");za.className="gePropHeader";var Ia=document.createElement("th");Ia.className="gePropHeaderCell";var Ca=document.createElement("img");Ca.src=Sidebar.prototype.expandedImage;Ca.style.verticalAlign="middle";Ia.appendChild(Ca);mxUtils.write(Ia,mxResources.get("property"));za.style.cursor="pointer";var Sa=function(){var W=Ea.querySelectorAll(".gePropNonHeaderRow");if(sa.editorUi.propertiesCollapsed){Ca.src=Sidebar.prototype.collapsedImage;var ea="none";for(var ka=q.childNodes.length-
-1;0<=ka;ka--)try{var xa=q.childNodes[ka],ta=xa.nodeName.toUpperCase();"INPUT"!=ta&&"SELECT"!=ta||q.removeChild(xa)}catch(pa){}}else Ca.src=Sidebar.prototype.expandedImage,ea="";for(ka=0;ka<W.length;ka++)W[ka].style.display=ea};mxEvent.addListener(za,"click",function(){sa.editorUi.propertiesCollapsed=!sa.editorUi.propertiesCollapsed;Sa()});za.appendChild(Ia);Ia=document.createElement("th");Ia.className="gePropHeaderCell";Ia.innerHTML=mxResources.get("value");za.appendChild(Ia);Ea.appendChild(za);var Pa=
-!1,Ta=!1;za=null;1==Q.vertices.length&&0==Q.edges.length?za=Q.vertices[0].id:0==Q.vertices.length&&1==Q.edges.length&&(za=Q.edges[0].id);null!=za&&Ea.appendChild(ja("id",mxUtils.htmlEntities(za),{dispName:"ID",type:"readOnly"},!0,!1));for(var Za in E)if(za=E[Za],"function"!=typeof za.isVisible||za.isVisible(Q,this)){var Na=null!=Q.style[Za]?mxUtils.htmlEntities(Q.style[Za]+""):null!=za.getDefaultValue?za.getDefaultValue(Q,this):za.defVal;if("separator"==za.type)Ta=!Ta;else{if("staticArr"==za.type)za.size=
-parseInt(Q.style[za.sizeProperty]||E[za.sizeProperty].defVal)||0;else if(null!=za.dependentProps){var z=za.dependentProps,J=[],O=[];for(Ia=0;Ia<z.length;Ia++){var U=Q.style[z[Ia]];O.push(E[z[Ia]].subDefVal);J.push(null!=U?U.split(","):[])}za.dependentPropsDefVal=O;za.dependentPropsVals=J}Ea.appendChild(ja(Za,Na,za,Pa,Ta));Pa=!Pa}}for(Ia=0;Ia<Aa.length;Ia++)for(za=Aa[Ia],E=za.parentRow,Q=0;Q<za.values.length;Q++)Za=ja(za.name,za.values[Q],{type:za.type,parentRow:za.parentRow,isDeletable:za.isDeletable,
-index:Q,defVal:za.defVal,countProperty:za.countProperty,size:za.size},0==Q%2,za.flipBkg),E.parentNode.insertBefore(Za,E.nextSibling),E=Za;q.appendChild(Ea);Sa();return q};StyleFormatPanel.prototype.addStyles=function(q){function E(za){mxEvent.addListener(za,"mouseenter",function(){za.style.opacity="1"});mxEvent.addListener(za,"mouseleave",function(){za.style.opacity="0.5"})}var Q=this.editorUi,Y=Q.editor.graph,R=document.createElement("div");R.style.whiteSpace="nowrap";R.style.paddingLeft="24px";
-R.style.paddingRight="20px";q.style.paddingLeft="16px";q.style.paddingBottom="6px";q.style.position="relative";q.appendChild(R);var Z="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),da=document.createElement("div");da.style.whiteSpace="nowrap";da.style.position="relative";da.style.textAlign="center";da.style.width="210px";for(var qa=[],va=0;va<this.defaultColorSchemes.length;va++){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(za){mxEvent.addListener(ja,"click",mxUtils.bind(this,function(){sa(za)}))})(va);qa.push(ja);da.appendChild(ja)}var sa=mxUtils.bind(this,function(za){null!=qa[za]&&(null!=this.format.currentScheme&&
-null!=qa[this.format.currentScheme]&&(qa[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=za,ya(this.defaultColorSchemes[this.format.currentScheme]),qa[this.format.currentScheme].style.background="#84d7ff")}),ya=mxUtils.bind(this,function(za){var Ia=mxUtils.bind(this,function(Sa){var Pa=mxUtils.button("",mxUtils.bind(this,function(Na){Y.getModel().beginUpdate();try{for(var z=Q.getSelectionState().cells,J=0;J<z.length;J++){for(var O=Y.getModel().getStyle(z[J]),U=
-0;U<Z.length;U++)O=mxUtils.removeStylename(O,Z[U]);var W=Y.getModel().isVertex(z[J])?Y.defaultVertexStyle:Y.defaultEdgeStyle;null!=Sa?(mxEvent.isShiftDown(Na)||(O=""==Sa.fill?mxUtils.setStyle(O,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(O,mxConstants.STYLE_FILLCOLOR,Sa.fill||mxUtils.getValue(W,mxConstants.STYLE_FILLCOLOR,null)),O=mxUtils.setStyle(O,mxConstants.STYLE_GRADIENTCOLOR,Sa.gradient||mxUtils.getValue(W,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(Na)||mxClient.IS_MAC&&
-mxEvent.isMetaDown(Na)||!Y.getModel().isVertex(z[J])||(O=mxUtils.setStyle(O,mxConstants.STYLE_FONTCOLOR,Sa.font||mxUtils.getValue(W,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(Na)||(O=""==Sa.stroke?mxUtils.setStyle(O,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(O,mxConstants.STYLE_STROKECOLOR,Sa.stroke||mxUtils.getValue(W,mxConstants.STYLE_STROKECOLOR,null)))):(O=mxUtils.setStyle(O,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(W,mxConstants.STYLE_FILLCOLOR,"#ffffff")),O=mxUtils.setStyle(O,
-mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(W,mxConstants.STYLE_STROKECOLOR,"#000000")),O=mxUtils.setStyle(O,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(W,mxConstants.STYLE_GRADIENTCOLOR,null)),Y.getModel().isVertex(z[J])&&(O=mxUtils.setStyle(O,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(W,mxConstants.STYLE_FONTCOLOR,null))));Y.getModel().setStyle(z[J],O)}}finally{Y.getModel().endUpdate()}}));Pa.className="geStyleButton";Pa.style.width="36px";Pa.style.height=10>=this.defaultColorSchemes.length?
-"24px":"30px";Pa.style.margin="0px 6px 6px 0px";if(null!=Sa){var Ta="1"==urlParams.sketch?"2px solid":"1px solid";null!=Sa.border&&(Ta=Sa.border);null!=Sa.gradient?mxClient.IS_IE&&10>document.documentMode?Pa.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Sa.fill+"', EndColorStr='"+Sa.gradient+"', GradientType=0)":Pa.style.backgroundImage="linear-gradient("+Sa.fill+" 0px,"+Sa.gradient+" 100%)":Sa.fill==mxConstants.NONE?Pa.style.background="url('"+Dialog.prototype.noColorImage+
-"')":Pa.style.backgroundColor=""==Sa.fill?mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):Sa.fill||mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");Pa.style.border=Sa.stroke==mxConstants.NONE?Ta+" transparent":""==Sa.stroke?Ta+" "+mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):Ta+" "+(Sa.stroke||mxUtils.getValue(Y.defaultVertexStyle,
-mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=Sa.title&&Pa.setAttribute("title",Sa.title)}else{Ta=mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var Za=mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");Pa.style.backgroundColor=Ta;Pa.style.border="1px solid "+Za}Pa.style.borderRadius="0";R.appendChild(Pa)});R.innerText="";for(var Ca=0;Ca<za.length;Ca++)0<Ca&&0==mxUtils.mod(Ca,4)&&mxUtils.br(R),Ia(za[Ca])});
-null==this.format.currentScheme?sa(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):sa(this.format.currentScheme);va=10>=this.defaultColorSchemes.length?28:8;var Aa=document.createElement("div");Aa.style.cssText="position:absolute;left:10px;top:8px;bottom:"+va+"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(Aa,"click",mxUtils.bind(this,function(){sa(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var Ea=document.createElement("div");Ea.style.cssText="position:absolute;left:202px;top:8px;bottom:"+va+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
-1<this.defaultColorSchemes.length&&(q.appendChild(Aa),q.appendChild(Ea));mxEvent.addListener(Ea,"click",mxUtils.bind(this,function(){sa(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));E(Aa);E(Ea);ya(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&q.appendChild(da);return q};StyleFormatPanel.prototype.addEditOps=function(q){var E=this.editorUi.getSelectionState(),Q=this.editorUi.editor.graph,Y=null;1==E.cells.length&&(Y=mxUtils.button(mxResources.get("editStyle"),
-mxUtils.bind(this,function(R){this.editorUi.actions.get("editStyle").funct()})),Y.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),Y.style.width="210px",Y.style.marginBottom="2px",q.appendChild(Y));Q=1==E.cells.length?Q.view.getState(E.cells[0]):null;null!=Q&&null!=Q.shape&&null!=Q.shape.stencil?(E=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(R){this.editorUi.actions.get("editShape").funct()})),E.setAttribute("title",
-mxResources.get("editShape")),E.style.marginBottom="2px",null==Y?E.style.width="210px":(Y.style.width="104px",E.style.width="104px",E.style.marginLeft="2px"),q.appendChild(E)):E.image&&0<E.cells.length&&(E=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(R){this.editorUi.actions.get("image").funct()})),E.setAttribute("title",mxResources.get("editImage")),E.style.marginBottom="2px",null==Y?E.style.width="210px":(Y.style.width="104px",E.style.width="104px",E.style.marginLeft="2px"),
-q.appendChild(E));return q}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(q){return q.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(q){return Graph.isGoogleFontUrl(q)};Graph.createFontElement=function(q,
-E){var Q=Graph.fontMapping[E];null==Q&&Graph.isCssFontUrl(E)?(q=document.createElement("link"),q.setAttribute("rel","stylesheet"),q.setAttribute("type","text/css"),q.setAttribute("charset","UTF-8"),q.setAttribute("href",E)):(null==Q&&(Q='@font-face {\nfont-family: "'+q+'";\nsrc: url("'+E+'");\n}'),q=document.createElement("style"),mxUtils.write(q,Q));return q};Graph.addFont=function(q,E,Q){if(null!=q&&0<q.length&&null!=E&&0<E.length){var Y=q.toLowerCase();if("helvetica"!=Y&&"arial"!=q&&"sans-serif"!=
-Y){var R=Graph.customFontElements[Y];null!=R&&R.url!=E&&(R.elt.parentNode.removeChild(R.elt),R=null);null==R?(R=E,"http:"==E.substring(0,5)&&(R=PROXY_URL+"?url="+encodeURIComponent(E)),R={name:q,url:E,elt:Graph.createFontElement(q,R)},Graph.customFontElements[Y]=R,Graph.recentCustomFonts[Y]=R,E=document.getElementsByTagName("head")[0],null!=Q&&("link"==R.elt.nodeName.toLowerCase()?(R.elt.onload=Q,R.elt.onerror=Q):Q()),null!=E&&E.appendChild(R.elt)):null!=Q&&Q()}else null!=Q&&Q()}else null!=Q&&Q();
-return q};Graph.getFontUrl=function(q,E){q=Graph.customFontElements[q.toLowerCase()];null!=q&&(E=q.url);return E};Graph.processFontAttributes=function(q){q=q.getElementsByTagName("*");for(var E=0;E<q.length;E++){var Q=q[E].getAttribute("data-font-src");if(null!=Q){var Y="FONT"==q[E].nodeName?q[E].getAttribute("face"):q[E].style.fontFamily;null!=Y&&Graph.addFont(Y,Q)}}};Graph.processFontStyle=function(q){if(null!=q){var E=mxUtils.getValue(q,"fontSource",null);if(null!=E){var Q=mxUtils.getValue(q,mxConstants.STYLE_FONTFAMILY,
-null);null!=Q&&Graph.addFont(Q,decodeURIComponent(E))}}return q};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=
-urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var G=Graph.prototype.init;Graph.prototype.init=function(){function q(R){E=R}G.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var E=null;mxEvent.addListener(this.container,"mouseenter",q);mxEvent.addListener(this.container,"mousemove",q);mxEvent.addListener(this.container,"mouseleave",function(R){E=null});this.isMouseInsertPoint=function(){return null!=E};var Q=this.getInsertPoint;
-this.getInsertPoint=function(){return null!=E?this.getPointForEvent(E):Q.apply(this,arguments)};var Y=this.layoutManager.getLayout;this.layoutManager.getLayout=function(R){var Z=this.graph.getCellStyle(R);if(null!=Z&&"rack"==Z.childLayout){var da=new mxStackLayout(this.graph,!1);da.gridSize=null!=Z.rackUnitSize?parseFloat(Z.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;da.marginLeft=Z.marginLeft||0;da.marginRight=Z.marginRight||0;da.marginTop=Z.marginTop||0;da.marginBottom=
-Z.marginBottom||0;da.allowGaps=Z.allowGaps||0;da.horizontal="1"==mxUtils.getValue(Z,"horizontalRack","0");da.resizeParent=!1;da.fill=!0;return da}return Y.apply(this,arguments)};this.updateGlobalUrlVariables()};var D=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(q,E){return Graph.processFontStyle(D.apply(this,arguments))};var I=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(q,E,Q,Y,R,Z,da,qa,va,ja,sa){I.apply(this,arguments);
-Graph.processFontAttributes(sa)};var H=mxText.prototype.redraw;mxText.prototype.redraw=function(){H.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(q,E,Q){function Y(){for(var za=da.getSelectionCells(),Ia=[],Ca=0;Ca<za.length;Ca++)da.isCellVisible(za[Ca])&&Ia.push(za[Ca]);da.setSelectionCells(Ia)}function R(za){da.setHiddenTags(za?[]:qa.slice());Y();da.refresh()}function Z(za,Ia){ja.innerText="";if(0<
-za.length){var Ca=document.createElement("table");Ca.setAttribute("cellpadding","2");Ca.style.boxSizing="border-box";Ca.style.tableLayout="fixed";Ca.style.width="100%";var Sa=document.createElement("tbody");if(null!=za&&0<za.length)for(var Pa=0;Pa<za.length;Pa++)(function(Ta){var Za=0>mxUtils.indexOf(da.hiddenTags,Ta),Na=document.createElement("tr"),z=document.createElement("td");z.style.align="center";z.style.width="16px";var J=document.createElement("img");J.setAttribute("src",Za?Editor.visibleImage:
-Editor.hiddenImage);J.setAttribute("title",mxResources.get(Za?"hideIt":"show",[Ta]));mxUtils.setOpacity(J,Za?75:25);J.style.verticalAlign="middle";J.style.cursor="pointer";J.style.width="16px";if(E||Editor.isDarkMode())J.style.filter="invert(100%)";z.appendChild(J);mxEvent.addListener(J,"click",function(U){mxEvent.isShiftDown(U)?R(0<=mxUtils.indexOf(da.hiddenTags,Ta)):(da.toggleHiddenTag(Ta),Y(),da.refresh());mxEvent.consume(U)});Na.appendChild(z);z=document.createElement("td");z.style.overflow="hidden";
-z.style.whiteSpace="nowrap";z.style.textOverflow="ellipsis";z.style.verticalAlign="middle";z.style.cursor="pointer";z.setAttribute("title",Ta);a=document.createElement("a");mxUtils.write(a,Ta);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Za?100:40);z.appendChild(a);mxEvent.addListener(z,"click",function(U){if(mxEvent.isShiftDown(U)){R(!0);var W=da.getCellsForTags([Ta],null,null,!0);da.isEnabled()?da.setSelectionCells(W):da.highlightCells(W)}else if(Za&&0<da.hiddenTags.length)R(!0);
-else{W=qa.slice();var ea=mxUtils.indexOf(W,Ta);W.splice(ea,1);da.setHiddenTags(W);Y();da.refresh()}mxEvent.consume(U)});Na.appendChild(z);if(da.isEnabled()){z=document.createElement("td");z.style.verticalAlign="middle";z.style.textAlign="center";z.style.width="18px";if(null==Ia){z.style.align="center";z.style.width="16px";J=document.createElement("img");J.setAttribute("src",Editor.crossImage);J.setAttribute("title",mxResources.get("removeIt",[Ta]));mxUtils.setOpacity(J,Za?75:25);J.style.verticalAlign=
-"middle";J.style.cursor="pointer";J.style.width="16px";if(E||Editor.isDarkMode())J.style.filter="invert(100%)";mxEvent.addListener(J,"click",function(U){var W=mxUtils.indexOf(qa,Ta);0<=W&&qa.splice(W,1);da.removeTagsForCells(da.model.getDescendants(da.model.getRoot()),[Ta]);da.refresh();mxEvent.consume(U)});z.appendChild(J)}else{var O=document.createElement("input");O.setAttribute("type","checkbox");O.style.margin="0px";O.defaultChecked=null!=Ia&&0<=mxUtils.indexOf(Ia,Ta);O.checked=O.defaultChecked;
-O.style.background="transparent";O.setAttribute("title",mxResources.get(O.defaultChecked?"removeIt":"add",[Ta]));mxEvent.addListener(O,"change",function(U){O.checked?da.addTagsForCells(da.getSelectionCells(),[Ta]):da.removeTagsForCells(da.getSelectionCells(),[Ta]);mxEvent.consume(U)});z.appendChild(O)}Na.appendChild(z)}Sa.appendChild(Na)})(za[Pa]);Ca.appendChild(Sa);ja.appendChild(Ca)}}var da=this,qa=da.hiddenTags.slice(),va=document.createElement("div");va.style.userSelect="none";va.style.overflow=
-"hidden";va.style.padding="10px";va.style.height="100%";var ja=document.createElement("div");ja.style.boxSizing="border-box";ja.style.borderRadius="4px";ja.style.userSelect="none";ja.style.overflow="auto";ja.style.position="absolute";ja.style.left="10px";ja.style.right="10px";ja.style.top="10px";ja.style.border=da.isEnabled()?"1px solid #808080":"none";ja.style.bottom=da.isEnabled()?"48px":"10px";va.appendChild(ja);var sa=mxUtils.button(mxResources.get("reset"),function(za){da.setHiddenTags([]);mxEvent.isShiftDown(za)||
-(qa=da.hiddenTags.slice());Y();da.refresh()});sa.setAttribute("title",mxResources.get("reset"));sa.className="geBtn";sa.style.margin="0 4px 0 0";var ya=mxUtils.button(mxResources.get("add"),function(){null!=Q&&Q(qa,function(za){qa=za;Aa()})});ya.setAttribute("title",mxResources.get("add"));ya.className="geBtn";ya.style.margin="0";da.addListener(mxEvent.ROOT,function(){qa=da.hiddenTags.slice()});var Aa=mxUtils.bind(this,function(za,Ia){if(q()){za=da.getAllTags();for(Ia=0;Ia<za.length;Ia++)0>mxUtils.indexOf(qa,
-za[Ia])&&qa.push(za[Ia]);qa.sort();da.isSelectionEmpty()?Z(qa):Z(qa,da.getCommonTagsForCells(da.getSelectionCells()))}});da.selectionModel.addListener(mxEvent.CHANGE,Aa);da.model.addListener(mxEvent.CHANGE,Aa);da.addListener(mxEvent.REFRESH,Aa);var Ea=document.createElement("div");Ea.style.boxSizing="border-box";Ea.style.whiteSpace="nowrap";Ea.style.position="absolute";Ea.style.overflow="hidden";Ea.style.bottom="0px";Ea.style.height="42px";Ea.style.right="10px";Ea.style.left="10px";da.isEnabled()&&
-(Ea.appendChild(sa),Ea.appendChild(ya),va.appendChild(Ea));return{div:va,refresh:Aa}};Graph.prototype.getCustomFonts=function(){var q=this.extFonts;q=null!=q?q.slice():[];for(var E in Graph.customFontElements){var Q=Graph.customFontElements[E];q.push({name:Q.name,url:Q.url})}return q};Graph.prototype.setFont=function(q,E){Graph.addFont(q,E);document.execCommand("fontname",!1,q);if(null!=E){var Q=this.cellEditor.textarea.getElementsByTagName("font");E=Graph.getFontUrl(q,E);for(var Y=0;Y<Q.length;Y++)Q[Y].getAttribute("face")==
-q&&Q[Y].getAttribute("data-font-src")!=E&&Q[Y].setAttribute("data-font-src",E)}};var S=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return S.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var q=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=q)for(var E in q)this.globalVars[E]=
-q[E]}catch(Q){null!=window.console&&console.log("Error in vars URL parameter: "+Q)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var T=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(q){var E=T.apply(this,arguments);null==E&&null!=this.globalVars&&(E=this.globalVars[q]);return E};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var q=this.themes["default-style2"];this.defaultStylesheet=
-(new mxCodec(q.ownerDocument)).decode(q)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var M=Graph.prototype.getSvg;Graph.prototype.getSvg=function(q,E,Q,Y,R,Z,da,qa,va,ja,sa,ya,Aa,Ea){var za=null,Ia=null,Ca=null;ya||null==this.themes||"darkTheme"!=this.defaultThemeName||(za=this.stylesheet,Ia=this.shapeForegroundColor,Ca=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?"#000000":Editor.lightColor,this.shapeBackgroundColor=
-"darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var Sa=M.apply(this,arguments),Pa=this.getCustomFonts();if(sa&&0<Pa.length){var Ta=Sa.ownerDocument,Za=null!=Ta.createElementNS?Ta.createElementNS(mxConstants.NS_SVG,"style"):Ta.createElement("style");null!=Ta.setAttributeNS?Za.setAttributeNS("type","text/css"):Za.setAttribute("type","text/css");for(var Na="",z="",J=0;J<Pa.length;J++){var O=Pa[J].name,U=Pa[J].url;Graph.isCssFontUrl(U)?
-Na+="@import url("+U+");\n":z+='@font-face {\nfont-family: "'+O+'";\nsrc: url("'+U+'");\n}\n'}Za.appendChild(Ta.createTextNode(Na+z));Sa.getElementsByTagName("defs")[0].appendChild(Za)}this.mathEnabled&&(document.body.appendChild(Sa),Editor.MathJaxRender(Sa),Sa.parentNode.removeChild(Sa));null!=za&&(this.shapeBackgroundColor=Ca,this.shapeForegroundColor=Ia,this.stylesheet=za,this.refresh());return Sa};var fa=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(q){fa.apply(this,
-arguments);null!=q.secondLabel&&(q.secondLabel.destroy(),q.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(q){return[q.shape,q.text,q.secondLabel,q.control]};var la=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){la.apply(this,arguments);this.enumerationState=0};var ra=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(q){null!=q.shape&&this.redrawEnumerationState(q);return ra.apply(this,arguments)};
-mxGraphView.prototype.createEnumerationValue=function(q){q=decodeURIComponent(mxUtils.getValue(q.style,"enumerateValue",""));""==q&&(q=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(q)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(q){var E="1"==mxUtils.getValue(q.style,"enumerate",0);E&&null==q.secondLabel?(q.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),
-q.secondLabel.size=12,q.secondLabel.state=q,q.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(q,q.secondLabel)):E||null==q.secondLabel||(q.secondLabel.destroy(),q.secondLabel=null);E=q.secondLabel;if(null!=E){var Q=q.view.scale,Y=this.createEnumerationValue(q);q=this.graph.model.isVertex(q.cell)?new mxRectangle(q.x+q.width-4*Q,q.y+4*Q,0,0):mxRectangle.fromPoint(q.view.getPoint(q));E.bounds.equals(q)&&E.value==Y&&E.scale==Q||(E.bounds=q,E.value=Y,E.scale=
-Q,E.redraw())}};var ba=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){ba.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var q=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||
-this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",q.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,q.ownerSVGElement))}};var oa=Graph.prototype.refresh;Graph.prototype.refresh=function(){oa.apply(this,
-arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var na=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){na.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(q){"data:action/json,"==q.substring(0,17)&&(q=JSON.parse(q.substring(17)),
-null!=q.actions&&this.executeCustomActions(q.actions))};Graph.prototype.executeCustomActions=function(q,E){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 Q=!1,Y=0,R=0,Z=mxUtils.bind(this,function(){Q||(Q=!0,this.model.beginUpdate())}),da=mxUtils.bind(this,
-function(){Q&&(Q=!1,this.model.endUpdate())}),qa=mxUtils.bind(this,function(){0<Y&&Y--;0==Y&&va()}),va=mxUtils.bind(this,function(){if(R<q.length){var ja=this.stoppingCustomActions,sa=q[R++],ya=[];if(null!=sa.open)if(da(),this.isCustomLink(sa.open)){if(!this.customLinkClicked(sa.open))return}else this.openLink(sa.open);null==sa.wait||ja||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;qa()}),Y++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,
-""!=sa.wait?parseInt(sa.wait):1E3),da());null!=sa.opacity&&null!=sa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(sa.opacity,!0)),sa.opacity.value);null!=sa.fadeIn&&(Y++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(sa.fadeIn,!0)),0,1,qa,ja?0:sa.fadeIn.delay));null!=sa.fadeOut&&(Y++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(sa.fadeOut,!0)),1,0,qa,ja?0:sa.fadeOut.delay));null!=sa.wipeIn&&(ya=ya.concat(this.createWipeAnimations(this.getCellsForAction(sa.wipeIn,
-!0),!0)));null!=sa.wipeOut&&(ya=ya.concat(this.createWipeAnimations(this.getCellsForAction(sa.wipeOut,!0),!1)));null!=sa.toggle&&(Z(),this.toggleCells(this.getCellsForAction(sa.toggle,!0)));if(null!=sa.show){Z();var Aa=this.getCellsForAction(sa.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(Aa),1);this.setCellsVisible(Aa,!0)}null!=sa.hide&&(Z(),Aa=this.getCellsForAction(sa.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(Aa),0),this.setCellsVisible(Aa,!1));null!=sa.toggleStyle&&null!=
-sa.toggleStyle.key&&(Z(),this.toggleCellStyles(sa.toggleStyle.key,null!=sa.toggleStyle.defaultValue?sa.toggleStyle.defaultValue:"0",this.getCellsForAction(sa.toggleStyle,!0)));null!=sa.style&&null!=sa.style.key&&(Z(),this.setCellStyles(sa.style.key,sa.style.value,this.getCellsForAction(sa.style,!0)));Aa=[];null!=sa.select&&this.isEnabled()&&(Aa=this.getCellsForAction(sa.select),this.setSelectionCells(Aa));null!=sa.highlight&&(Aa=this.getCellsForAction(sa.highlight),this.highlightCells(Aa,sa.highlight.color,
-sa.highlight.duration,sa.highlight.opacity));null!=sa.scroll&&(Aa=this.getCellsForAction(sa.scroll));null!=sa.viewbox&&this.fitWindow(sa.viewbox,sa.viewbox.border);0<Aa.length&&this.scrollCellToVisible(Aa[0]);if(null!=sa.tags){Aa=[];null!=sa.tags.hidden&&(Aa=Aa.concat(sa.tags.hidden));if(null!=sa.tags.visible)for(var Ea=this.getAllTags(),za=0;za<Ea.length;za++)0>mxUtils.indexOf(sa.tags.visible,Ea[za])&&0>mxUtils.indexOf(Aa,Ea[za])&&Aa.push(Ea[za]);this.setHiddenTags(Aa);this.refresh()}0<ya.length&&
-(Y++,this.executeAnimations(ya,qa,ja?1:sa.steps,ja?0:sa.delay));0==Y?va():da()}else this.stoppingCustomActions=this.executingCustomActions=!1,da(),null!=E&&E()});va()}};Graph.prototype.doUpdateCustomLinksForCell=function(q,E){var Q=this.getLinkForCell(E);null!=Q&&"data:action/json,"==Q.substring(0,17)&&this.setLinkForCell(E,this.updateCustomLink(q,Q));if(this.isHtmlLabel(E)){var Y=document.createElement("div");Y.innerHTML=this.sanitizeHtml(this.getLabel(E));for(var R=Y.getElementsByTagName("a"),Z=
-!1,da=0;da<R.length;da++)Q=R[da].getAttribute("href"),null!=Q&&"data:action/json,"==Q.substring(0,17)&&(R[da].setAttribute("href",this.updateCustomLink(q,Q)),Z=!0);Z&&this.labelChanged(E,Y.innerHTML)}};Graph.prototype.updateCustomLink=function(q,E){if("data:action/json,"==E.substring(0,17))try{var Q=JSON.parse(E.substring(17));null!=Q.actions&&(this.updateCustomLinkActions(q,Q.actions),E="data:action/json,"+JSON.stringify(Q))}catch(Y){}return E};Graph.prototype.updateCustomLinkActions=function(q,
-E){for(var Q=0;Q<E.length;Q++){var Y=E[Q],R;for(R in Y)this.updateCustomLinkAction(q,Y[R],"cells"),this.updateCustomLinkAction(q,Y[R],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(q,E,Q){if(null!=E&&null!=E[Q]){for(var Y=[],R=0;R<E[Q].length;R++)if("*"==E[Q][R])Y.push(E[Q][R]);else{var Z=q[E[Q][R]];null!=Z?""!=Z&&Y.push(Z):Y.push(E[Q][R])}E[Q]=Y}};Graph.prototype.getCellsForAction=function(q,E){E=this.getCellsById(q.cells).concat(this.getCellsForTags(q.tags,null,E));if(null!=q.excludeCells){for(var Q=
-[],Y=0;Y<E.length;Y++)0>q.excludeCells.indexOf(E[Y].id)&&Q.push(E[Y]);E=Q}return E};Graph.prototype.getCellsById=function(q){var E=[];if(null!=q)for(var Q=0;Q<q.length;Q++)if("*"==q[Q]){var Y=this.model.getRoot();E=E.concat(this.model.filterDescendants(function(Z){return Z!=Y},Y))}else{var R=this.model.getCell(q[Q]);null!=R&&E.push(R)}return E};var N=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(q){return N.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(q))};
-Graph.prototype.setHiddenTags=function(q){this.hiddenTags=q;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(q){var E=mxUtils.indexOf(this.hiddenTags,q);0>E?this.hiddenTags.push(q):0<=E&&this.hiddenTags.splice(E,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(q){if(null==q||0==q.length||0==this.hiddenTags.length)return!1;q=q.split(" ");if(q.length>this.hiddenTags.length)return!1;for(var E=0;E<q.length;E++)if(0>
-mxUtils.indexOf(this.hiddenTags,q[E]))return!1;return!0};Graph.prototype.getCellsForTags=function(q,E,Q,Y){var R=[];if(null!=q){E=null!=E?E:this.model.getDescendants(this.model.getRoot());for(var Z=0,da={},qa=0;qa<q.length;qa++)0<q[qa].length&&(da[q[qa]]=!0,Z++);for(qa=0;qa<E.length;qa++)if(Q&&this.model.getParent(E[qa])==this.model.root||this.model.isVertex(E[qa])||this.model.isEdge(E[qa])){var va=this.getTagsForCell(E[qa]),ja=!1;if(0<va.length&&(va=va.split(" "),va.length>=q.length)){for(var sa=
-ja=0;sa<va.length&&ja<Z;sa++)null!=da[va[sa]]&&ja++;ja=ja==Z}ja&&(1!=Y||this.isCellVisible(E[qa]))&&R.push(E[qa])}}return R};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(q){for(var E=null,Q=[],Y=0;Y<q.length;Y++){var R=this.getTagsForCell(q[Y]);Q=[];if(0<R.length){R=R.split(" ");for(var Z={},da=0;da<R.length;da++)if(null==E||null!=E[R[da]])Z[R[da]]=!0,Q.push(R[da]);E=Z}else return[]}return Q};
-Graph.prototype.getTagsForCells=function(q){for(var E=[],Q={},Y=0;Y<q.length;Y++){var R=this.getTagsForCell(q[Y]);if(0<R.length){R=R.split(" ");for(var Z=0;Z<R.length;Z++)null==Q[R[Z]]&&(Q[R[Z]]=!0,E.push(R[Z]))}}return E};Graph.prototype.getTagsForCell=function(q){return this.getAttributeForCell(q,"tags","")};Graph.prototype.addTagsForCells=function(q,E){if(0<q.length&&0<E.length){this.model.beginUpdate();try{for(var Q=0;Q<q.length;Q++){for(var Y=this.getTagsForCell(q[Q]),R=Y.split(" "),Z=!1,da=
-0;da<E.length;da++){var qa=mxUtils.trim(E[da]);""!=qa&&0>mxUtils.indexOf(R,qa)&&(Y=0<Y.length?Y+" "+qa:qa,Z=!0)}Z&&this.setAttributeForCell(q[Q],"tags",Y)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(q,E){if(0<q.length&&0<E.length){this.model.beginUpdate();try{for(var Q=0;Q<q.length;Q++){var Y=this.getTagsForCell(q[Q]);if(0<Y.length){for(var R=Y.split(" "),Z=!1,da=0;da<E.length;da++){var qa=mxUtils.indexOf(R,E[da]);0<=qa&&(R.splice(qa,1),Z=!0)}Z&&this.setAttributeForCell(q[Q],
-"tags",R.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(q){this.model.beginUpdate();try{for(var E=0;E<q.length;E++)this.model.setVisible(q[E],!this.model.isVisible(q[E]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(q,E){this.model.beginUpdate();try{for(var Q=0;Q<q.length;Q++)this.model.setVisible(q[Q],E)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(q,E,Q,Y){for(var R=0;R<q.length;R++)this.highlightCell(q[R],
-E,Q,Y)};Graph.prototype.highlightCell=function(q,E,Q,Y,R){E=null!=E?E:mxConstants.DEFAULT_VALID_COLOR;Q=null!=Q?Q:1E3;q=this.view.getState(q);var Z=null;null!=q&&(R=null!=R?R:4,R=Math.max(R+1,mxUtils.getValue(q.style,mxConstants.STYLE_STROKEWIDTH,1)+R),Z=new mxCellHighlight(this,E,R,!1),null!=Y&&(Z.opacity=Y),Z.highlight(q),window.setTimeout(function(){null!=Z.shape&&(mxUtils.setPrefixedStyle(Z.shape.node.style,"transition","all 1200ms ease-in-out"),Z.shape.node.style.opacity=0);window.setTimeout(function(){Z.destroy()},
-1200)},Q));return Z};Graph.prototype.addSvgShadow=function(q,E,Q,Y){Q=null!=Q?Q:!1;Y=null!=Y?Y:!0;var R=q.ownerDocument,Z=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"filter"):R.createElement("filter");Z.setAttribute("id",this.shadowId);var da=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):R.createElement("feGaussianBlur");da.setAttribute("in","SourceAlpha");da.setAttribute("stdDeviation",this.svgShadowBlur);da.setAttribute("result","blur");Z.appendChild(da);
-da=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feOffset"):R.createElement("feOffset");da.setAttribute("in","blur");da.setAttribute("dx",this.svgShadowSize);da.setAttribute("dy",this.svgShadowSize);da.setAttribute("result","offsetBlur");Z.appendChild(da);da=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feFlood"):R.createElement("feFlood");da.setAttribute("flood-color",this.svgShadowColor);da.setAttribute("flood-opacity",this.svgShadowOpacity);da.setAttribute("result",
-"offsetColor");Z.appendChild(da);da=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feComposite"):R.createElement("feComposite");da.setAttribute("in","offsetColor");da.setAttribute("in2","offsetBlur");da.setAttribute("operator","in");da.setAttribute("result","offsetBlur");Z.appendChild(da);da=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feBlend"):R.createElement("feBlend");da.setAttribute("in","SourceGraphic");da.setAttribute("in2","offsetBlur");Z.appendChild(da);da=
-q.getElementsByTagName("defs");0==da.length?(R=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"defs"):R.createElement("defs"),null!=q.firstChild?q.insertBefore(R,q.firstChild):q.appendChild(R)):R=da[0];R.appendChild(Z);Q||(E=null!=E?E:q.getElementsByTagName("g")[0],null!=E&&(E.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(q.getAttribute("width")))&&Y&&(q.setAttribute("width",parseInt(q.getAttribute("width"))+6),q.setAttribute("height",parseInt(q.getAttribute("height"))+
-6),E=q.getAttribute("viewBox"),null!=E&&0<E.length&&(E=E.split(" "),3<E.length&&(w=parseFloat(E[2])+6,h=parseFloat(E[3])+6,q.setAttribute("viewBox",E[0]+" "+E[1]+" "+w+" "+h))))));return Z};Graph.prototype.setShadowVisible=function(q,E){mxClient.IS_SVG&&!mxClient.IS_SF&&(E=null!=E?E:!0,(this.shadowVisible=q)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),E&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=
-function(){if(null==this.defaultParent){var q=this.model.getChildCount(this.model.root),E=0;do var Q=this.model.getChildAt(this.model.root,E);while(E++<q&&"1"==mxUtils.getValue(this.getCellStyle(Q),"locked","0"));null!=Q&&this.setDefaultParent(Q)}};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=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.kubernetes=[SHAPES_PATH+"/mxKubernetes.js",
-STENCIL_PATH+"/kubernetes.xml"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=
-[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=[SHAPES_PATH+"/ios7/mxIOS7Ui.js",STENCIL_PATH+"/ios7/misc.xml"];mxStencilRegistry.libraries.android=[SHAPES_PATH+"/mxAndroid.js",STENCIL_PATH+"/android/android.xml"];mxStencilRegistry.libraries["electrical/abstract"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/abstract.xml"];mxStencilRegistry.libraries["electrical/logic_gates"]=
-[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries["electrical/miscellaneous"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/miscellaneous.xml"];mxStencilRegistry.libraries["electrical/signal_sources"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/signal_sources.xml"];mxStencilRegistry.libraries["electrical/electro-mechanical"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/electro-mechanical.xml"];mxStencilRegistry.libraries["electrical/transmission"]=
-[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/transmission.xml"];mxStencilRegistry.libraries.infographic=[SHAPES_PATH+"/mxInfographic.js"];mxStencilRegistry.libraries["mockup/buttons"]=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries["mockup/containers"]=[SHAPES_PATH+"/mockup/mxMockupContainers.js"];mxStencilRegistry.libraries["mockup/forms"]=[SHAPES_PATH+"/mockup/mxMockupForms.js"];mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",
-STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",
-STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.ibm=[SHAPES_PATH+"/mxIBM.js",STENCIL_PATH+"/ibm.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];
-mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=
-[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+
-"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(q){var E=null;null!=q&&0<q.length&&("ER"==q.substring(0,2)?E="mxgraph.er":"sysML"==q.substring(0,5)&&(E="mxgraph.sysml"));return E};var aa=mxMarker.createMarker;mxMarker.createMarker=
-function(q,E,Q,Y,R,Z,da,qa,va,ja){if(null!=Q&&null==mxMarker.markers[Q]){var sa=this.getPackageForType(Q);null!=sa&&mxStencilRegistry.getStencil(sa)}return aa.apply(this,arguments)};var V=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(q,E,Q,Y,R,Z){"1"==mxUtils.getValue(E.style,"lineShape",null)&&q.setFillColor(mxUtils.getValue(E.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return V.apply(this,arguments)};PrintDialog.prototype.create=function(q,E){function Q(){Aa.value=Math.max(1,
-Math.min(qa,Math.max(parseInt(Aa.value),parseInt(ya.value))));ya.value=Math.max(1,Math.min(qa,Math.min(parseInt(Aa.value),parseInt(ya.value))))}function Y(pa){function ua($a,ab,ib){var gb=$a.useCssTransforms,qb=$a.currentTranslate,nb=$a.currentScale,mb=$a.view.translate,Bb=$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 wb=$a.getGraphBounds(),rb=0,vb=0,kb=xa.get(),hb=1/$a.pageScale,
-tb=Sa.checked;if(tb){hb=parseInt(ea.value);var Cb=parseInt(ka.value);hb=Math.min(kb.height*Cb/(wb.height/$a.view.scale),kb.width*hb/(wb.width/$a.view.scale))}else hb=parseInt(Ca.value)/(100*$a.pageScale),isNaN(hb)&&(Da=1/$a.pageScale,Ca.value="100 %");kb=mxRectangle.fromRectangle(kb);kb.width=Math.ceil(kb.width*Da);kb.height=Math.ceil(kb.height*Da);hb*=Da;!tb&&$a.pageVisible?(wb=$a.getPageLayout(),rb-=wb.x*kb.width,vb-=wb.y*kb.height):tb=!0;if(null==ab){ab=PrintDialog.createPrintPreview($a,hb,kb,
-0,rb,vb,tb);ab.pageSelector=!1;ab.mathEnabled=!1;Ea.checked&&(ab.isCellVisible=function(ob){return $a.isCellSelected(ob)});rb=q.getCurrentFile();null!=rb&&(ab.title=rb.getTitle());var xb=ab.writeHead;ab.writeHead=function(ob){xb.apply(this,arguments);mxClient.IS_GC&&(ob.writeln('<style type="text/css">'),ob.writeln("@media print {"),ob.writeln(".MathJax svg { shape-rendering: crispEdges; }"),ob.writeln("}"),ob.writeln("</style>"));null!=q.editor.fontCss&&(ob.writeln('<style type="text/css">'),ob.writeln(q.editor.fontCss),
-ob.writeln("</style>"));for(var yb=$a.getCustomFonts(),Ab=0;Ab<yb.length;Ab++){var c=yb[Ab].name,l=yb[Ab].url;Graph.isCssFontUrl(l)?ob.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(l)+'" charset="UTF-8" type="text/css">'):(ob.writeln('<style type="text/css">'),ob.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(c)+'";\nsrc: url("'+mxUtils.htmlEntities(l)+'");\n}'),ob.writeln("</style>"))}};if("undefined"!==typeof MathJax){var zb=ab.renderPage;ab.renderPage=function(ob,yb,
-Ab,c,l,v){var n=mxClient.NO_FO,u=zb.apply(this,arguments);mxClient.NO_FO=n;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:u.className="geDisableMathJax";return u}}rb=null;vb=R.shapeForegroundColor;tb=R.shapeBackgroundColor;kb=R.enableFlowAnimation;R.enableFlowAnimation=!1;null!=R.themes&&"darkTheme"==R.defaultThemeName&&(rb=R.stylesheet,R.stylesheet=R.getDefaultStylesheet(),R.shapeForegroundColor="#000000",R.shapeBackgroundColor="#ffffff",R.refresh());ab.open(null,null,ib,!0);R.enableFlowAnimation=
-kb;null!=rb&&(R.shapeForegroundColor=vb,R.shapeBackgroundColor=tb,R.stylesheet=rb,R.refresh())}else{kb=$a.background;if(null==kb||""==kb||kb==mxConstants.NONE)kb="#ffffff";ab.backgroundColor=kb;ab.autoOrigin=tb;ab.appendGraph($a,hb,rb,vb,ib,!0);ib=$a.getCustomFonts();if(null!=ab.wnd)for(rb=0;rb<ib.length;rb++)vb=ib[rb].name,tb=ib[rb].url,Graph.isCssFontUrl(tb)?ab.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(tb)+'" charset="UTF-8" type="text/css">'):(ab.wnd.document.writeln('<style type="text/css">'),
-ab.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(vb)+'";\nsrc: url("'+mxUtils.htmlEntities(tb)+'");\n}'),ab.wnd.document.writeln("</style>"))}gb&&($a.useCssTransforms=gb,$a.currentTranslate=qb,$a.currentScale=nb,$a.view.translate=mb,$a.view.scale=Bb);return ab}var Da=parseInt(ta.value)/100;isNaN(Da)&&(Da=1,ta.value="100 %");Da*=.75;var Fa=null,Ma=R.shapeForegroundColor,Qa=R.shapeBackgroundColor;null!=R.themes&&"darkTheme"==R.defaultThemeName&&(Fa=R.stylesheet,R.stylesheet=
-R.getDefaultStylesheet(),R.shapeForegroundColor="#000000",R.shapeBackgroundColor="#ffffff",R.refresh());var Ba=ya.value,Ka=Aa.value,Oa=!ja.checked,Ya=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(q,ja.checked,Ba,Ka,Sa.checked,ea.value,ka.value,parseInt(Ca.value)/100,parseInt(ta.value)/100,xa.get());else{Oa&&(Oa=Ea.checked||Ba==va&&Ka==va);if(!Oa&&null!=q.pages&&q.pages.length){var db=0;Oa=q.pages.length-1;ja.checked||(db=parseInt(Ba)-1,Oa=parseInt(Ka)-1);for(var eb=db;eb<=Oa;eb++){var cb=
-q.pages[eb];Ba=cb==q.currentPage?R:null;if(null==Ba){Ba=q.createTemporaryGraph(R.stylesheet);Ba.shapeForegroundColor=R.shapeForegroundColor;Ba.shapeBackgroundColor=R.shapeBackgroundColor;Ka=!0;db=!1;var ub=null,fb=null;null==cb.viewState&&null==cb.root&&q.updatePageRoot(cb);null!=cb.viewState&&(Ka=cb.viewState.pageVisible,db=cb.viewState.mathEnabled,ub=cb.viewState.background,fb=cb.viewState.backgroundImage,Ba.extFonts=cb.viewState.extFonts);null!=fb&&null!=fb.originalSrc&&(fb=q.createImageForPageLink(fb.originalSrc,
-cb));Ba.background=ub;Ba.backgroundImage=null!=fb?new mxImage(fb.src,fb.width,fb.height,fb.x,fb.y):null;Ba.pageVisible=Ka;Ba.mathEnabled=db;var pb=Ba.getGraphBounds;Ba.getGraphBounds=function(){var $a=pb.apply(this,arguments),ab=this.backgroundImage;if(null!=ab&&null!=ab.width&&null!=ab.height){var ib=this.view.translate,gb=this.view.scale;$a=mxRectangle.fromRectangle($a);$a.add(new mxRectangle((ib.x+ab.x)*gb,(ib.y+ab.y)*gb,ab.width*gb,ab.height*gb))}return $a};var lb=Ba.getGlobalVariable;Ba.getGlobalVariable=
-function($a){return"page"==$a?cb.getName():"pagenumber"==$a?eb+1:"pagecount"==$a?null!=q.pages?q.pages.length:1:lb.apply(this,arguments)};document.body.appendChild(Ba.container);q.updatePageRoot(cb);Ba.model.setRoot(cb.root)}Ya=ua(Ba,Ya,eb!=Oa);Ba!=R&&Ba.container.parentNode.removeChild(Ba.container)}}else Ya=ua(R);null==Ya?q.handleError({message:mxResources.get("errorUpdatingPreview")}):(Ya.mathEnabled&&(Oa=Ya.wnd.document,pa&&(Ya.wnd.IMMEDIATE_PRINT=!0),Oa.writeln('<script type="text/javascript" src="'+
-DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),Ya.closeDocument(),!Ya.mathEnabled&&pa&&PrintDialog.printPreview(Ya));null!=Fa&&(R.shapeForegroundColor=Ma,R.shapeBackgroundColor=Qa,R.stylesheet=Fa,R.refresh())}}var R=q.editor.graph,Z=document.createElement("div"),da=document.createElement("h3");da.style.width="100%";da.style.textAlign="center";da.style.marginTop="0px";mxUtils.write(da,E||mxResources.get("print"));Z.appendChild(da);var qa=1,va=1;da=document.createElement("div");da.style.cssText=
-"border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var ja=document.createElement("input");ja.style.cssText="margin-right:8px;margin-bottom:8px;";ja.setAttribute("value","all");ja.setAttribute("type","radio");ja.setAttribute("name","pages-printdialog");da.appendChild(ja);E=document.createElement("span");mxUtils.write(E,mxResources.get("printAllPages"));da.appendChild(E);mxUtils.br(da);var sa=ja.cloneNode(!0);ja.setAttribute("checked","checked");sa.setAttribute("value","range");
-da.appendChild(sa);E=document.createElement("span");mxUtils.write(E,mxResources.get("pages")+":");da.appendChild(E);var ya=document.createElement("input");ya.style.cssText="margin:0 8px 0 8px;";ya.setAttribute("value","1");ya.setAttribute("type","number");ya.setAttribute("min","1");ya.style.width="50px";da.appendChild(ya);E=document.createElement("span");mxUtils.write(E,mxResources.get("to"));da.appendChild(E);var Aa=ya.cloneNode(!0);da.appendChild(Aa);mxEvent.addListener(ya,"focus",function(){sa.checked=
-!0});mxEvent.addListener(Aa,"focus",function(){sa.checked=!0});mxEvent.addListener(ya,"change",Q);mxEvent.addListener(Aa,"change",Q);if(null!=q.pages&&(qa=q.pages.length,null!=q.currentPage))for(E=0;E<q.pages.length;E++)if(q.currentPage==q.pages[E]){va=E+1;ya.value=va;Aa.value=va;break}ya.setAttribute("max",qa);Aa.setAttribute("max",qa);q.isPagesEnabled()?1<qa&&(Z.appendChild(da),sa.checked=!0):sa.checked=!0;mxUtils.br(da);var Ea=document.createElement("input");Ea.setAttribute("value","all");Ea.setAttribute("type",
-"radio");Ea.style.marginRight="8px";R.isSelectionEmpty()&&Ea.setAttribute("disabled","disabled");var za=document.createElement("div");za.style.marginBottom="10px";1==qa?(Ea.setAttribute("type","checkbox"),Ea.style.marginBottom="12px",za.appendChild(Ea)):(Ea.setAttribute("name","pages-printdialog"),Ea.style.marginBottom="8px",da.appendChild(Ea));E=document.createElement("span");mxUtils.write(E,mxResources.get("selectionOnly"));Ea.parentNode.appendChild(E);1==qa&&mxUtils.br(Ea.parentNode);var Ia=document.createElement("input");
-Ia.style.marginRight="8px";Ia.setAttribute("value","adjust");Ia.setAttribute("type","radio");Ia.setAttribute("name","printZoom");za.appendChild(Ia);E=document.createElement("span");mxUtils.write(E,mxResources.get("adjustTo"));za.appendChild(E);var Ca=document.createElement("input");Ca.style.cssText="margin:0 8px 0 8px;";Ca.setAttribute("value","100 %");Ca.style.width="50px";za.appendChild(Ca);mxEvent.addListener(Ca,"focus",function(){Ia.checked=!0});Z.appendChild(za);da=da.cloneNode(!1);var Sa=Ia.cloneNode(!0);
-Sa.setAttribute("value","fit");Ia.setAttribute("checked","checked");E=document.createElement("div");E.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";E.appendChild(Sa);da.appendChild(E);za=document.createElement("table");za.style.display="inline-block";var Pa=document.createElement("tbody"),Ta=document.createElement("tr"),Za=Ta.cloneNode(!0),Na=document.createElement("td"),z=Na.cloneNode(!0),J=Na.cloneNode(!0),O=Na.cloneNode(!0),U=Na.cloneNode(!0),W=Na.cloneNode(!0);Na.style.textAlign=
-"right";O.style.textAlign="right";mxUtils.write(Na,mxResources.get("fitTo"));var ea=document.createElement("input");ea.style.cssText="margin:0 8px 0 8px;";ea.setAttribute("value","1");ea.setAttribute("min","1");ea.setAttribute("type","number");ea.style.width="40px";z.appendChild(ea);E=document.createElement("span");mxUtils.write(E,mxResources.get("fitToSheetsAcross"));J.appendChild(E);mxUtils.write(O,mxResources.get("fitToBy"));var ka=ea.cloneNode(!0);U.appendChild(ka);mxEvent.addListener(ea,"focus",
-function(){Sa.checked=!0});mxEvent.addListener(ka,"focus",function(){Sa.checked=!0});E=document.createElement("span");mxUtils.write(E,mxResources.get("fitToSheetsDown"));W.appendChild(E);Ta.appendChild(Na);Ta.appendChild(z);Ta.appendChild(J);Za.appendChild(O);Za.appendChild(U);Za.appendChild(W);Pa.appendChild(Ta);Pa.appendChild(Za);za.appendChild(Pa);da.appendChild(za);Z.appendChild(da);da=document.createElement("div");E=document.createElement("div");E.style.fontWeight="bold";E.style.marginBottom=
-"12px";mxUtils.write(E,mxResources.get("paperSize"));da.appendChild(E);E=document.createElement("div");E.style.marginBottom="12px";var xa=PageSetupDialog.addPageFormatPanel(E,"printdialog",q.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);da.appendChild(E);E=document.createElement("span");mxUtils.write(E,mxResources.get("pageScale"));da.appendChild(E);var ta=document.createElement("input");ta.style.cssText="margin:0 8px 0 8px;";ta.setAttribute("value","100 %");ta.style.width="60px";
-da.appendChild(ta);Z.appendChild(da);E=document.createElement("div");E.style.cssText="text-align:right;margin:48px 0 0 0;";da=mxUtils.button(mxResources.get("cancel"),function(){q.hideDialog()});da.className="geBtn";q.editor.cancelFirst&&E.appendChild(da);q.isOffline()||(za=mxUtils.button(mxResources.get("help"),function(){R.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),za.className="geBtn",E.appendChild(za));PrintDialog.previewEnabled&&(za=mxUtils.button(mxResources.get("preview"),
-function(){q.hideDialog();Y(!1)}),za.className="geBtn",E.appendChild(za));za=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){q.hideDialog();Y(!0)});za.className="geBtn gePrimaryBtn";E.appendChild(za);q.editor.cancelFirst||E.appendChild(da);Z.appendChild(E);this.container=Z};var ha=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||
-(this.page.viewState.background=this.color);if(!this.ignoreImage){var q=this.image;null!=q&&null!=q.src&&Graph.isPageLink(q.src)&&(q={originalSrc:q.src});this.page.viewState.backgroundImage=q}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else ha.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&
-(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var X=document.createElement("canvas"),ia=new Image;ia.onload=function(){try{X.getContext("2d").drawImage(ia,0,0);var q=X.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=q&&6<q.length}catch(E){}};
-ia.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(q){}Editor.prototype.useCanvasForExport=!1})();
-(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(e,k,m){m.ui=e.ui;return k};b.afterDecode=function(e,k,m){m.previousColor=m.color;m.previousImage=m.image;m.previousFormat=m.format;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,k,m){m.ui=e.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.3.1";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
+dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(q,F){var S=mxUtils.getValue(q.style,mxConstants.STYLE_FILLCOLOR,null);return F.editorUi.editor.graph.isSwimlane(q.vertices[0])||null==S||S==mxConstants.NONE||0==mxUtils.getValue(q.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(q.style,mxConstants.STYLE_OPACITY,100)||null!=q.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(q,F){return 0<q.vertices.length&&
+F.editorUi.editor.graph.isContainer(q.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
+Editor.createRoughCanvas=function(q){var F=rough.canvas({getContext:function(){return q}});F.draw=function(S){var ba=S.sets||[];S=S.options||this.getDefaultOptions();for(var U=0;U<ba.length;U++){var ca=ba[U];switch(ca.type){case "path":null!=S.stroke&&this._drawToContext(q,ca,S);break;case "fillPath":this._drawToContext(q,ca,S);break;case "fillSketch":this.fillSketch(q,ca,S)}}};F.fillSketch=function(S,ba,U){var ca=q.state.strokeColor,ea=q.state.strokeWidth,na=q.state.strokeAlpha,ra=q.state.dashed,
+ya=U.fillWeight;0>ya&&(ya=U.strokeWidth/2);q.setStrokeAlpha(q.state.fillAlpha);q.setStrokeColor(U.fill||"");q.setStrokeWidth(ya);q.setDashed(!1);this._drawToContext(S,ba,U);q.setDashed(ra);q.setStrokeWidth(ea);q.setStrokeColor(ca);q.setStrokeAlpha(na)};F._drawToContext=function(S,ba,U){S.begin();for(var ca=0;ca<ba.ops.length;ca++){var ea=ba.ops[ca],na=ea.data;switch(ea.op){case "move":S.moveTo(na[0],na[1]);break;case "bcurveTo":S.curveTo(na[0],na[1],na[2],na[3],na[4],na[5]);break;case "lineTo":S.lineTo(na[0],
+na[1])}}S.end();"fillPath"===ba.type&&U.filled?S.fill():S.stroke()};return F};(function(){function q(ca,ea,na){this.canvas=ca;this.rc=ea;this.shape=na;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,q.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,q.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,q.prototype.rect);this.originalRoundrect=
+this.canvas.roundrect;this.canvas.roundrect=mxUtils.bind(this,q.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,q.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,q.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,q.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,q.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
+this.canvas.curveTo=mxUtils.bind(this,q.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,q.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,q.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,q.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,q.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=
+mxUtils.bind(this,q.prototype.fillAndStroke);this.path=[];this.passThrough=!1}q.prototype.moveOp="M";q.prototype.lineOp="L";q.prototype.quadOp="Q";q.prototype.curveOp="C";q.prototype.closeOp="Z";q.prototype.getStyle=function(ca,ea){var na=1;if(null!=this.shape.state){var ra=this.shape.state.cell.id;if(null!=ra)for(var ya=0;ya<ra.length;ya++)na=(na<<5)-na+ra.charCodeAt(ya)<<0}na={strokeWidth:this.canvas.state.strokeWidth,seed:na,preserveVertices:!0};ra=this.rc.getDefaultOptions();na.stroke=ca?this.canvas.state.strokeColor===
+mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;ca=null;(na.filled=ea)?(na.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,ca=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):na.fill="";na.bowing=mxUtils.getValue(this.shape.style,"bowing",ra.bowing);na.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",ra.hachureAngle);na.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",
+ra.curveFitting);na.roughness=mxUtils.getValue(this.shape.style,"jiggle",ra.roughness);na.simplification=mxUtils.getValue(this.shape.style,"simplification",ra.simplification);na.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",ra.disableMultiStroke);na.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",ra.disableMultiStrokeFill);ea=mxUtils.getValue(this.shape.style,"hachureGap",-1);na.hachureGap="auto"==ea?-1:ea;na.dashGap=mxUtils.getValue(this.shape.style,
+"dashGap",ea);na.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",ea);na.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",ea);ea=mxUtils.getValue(this.shape.style,"fillWeight",-1);na.fillWeight="auto"==ea?-1:ea;ea=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==ea&&(ea=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),ea=null!=na.fill&&(null!=ca||null!=ea&&na.fill==ea)?"solid":
+ra.fillStyle);na.fillStyle=ea;return na};q.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};q.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};q.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var ca=2;ca<arguments.length;ca+=2)this.lastX=arguments[ca-1],this.lastY=arguments[ca],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};
+q.prototype.lineTo=function(ca,ea){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,ca,ea),this.lastX=ca,this.lastY=ea)};q.prototype.moveTo=function(ca,ea){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,ca,ea),this.lastX=ca,this.lastY=ea,this.firstX=ca,this.firstY=ea)};q.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};q.prototype.quadTo=function(ca,
+ea,na,ra){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,ca,ea,na,ra),this.lastX=na,this.lastY=ra)};q.prototype.curveTo=function(ca,ea,na,ra,ya,va){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,ca,ea,na,ra,ya,va),this.lastX=ya,this.lastY=va)};q.prototype.arcTo=function(ca,ea,na,ra,ya,va,Da){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var pa=mxUtils.arcToCurves(this.lastX,this.lastY,
+ca,ea,na,ra,ya,va,Da);if(null!=pa)for(var Aa=0;Aa<pa.length;Aa+=6)this.curveTo(pa[Aa],pa[Aa+1],pa[Aa+2],pa[Aa+3],pa[Aa+4],pa[Aa+5]);this.lastX=va;this.lastY=Da}};q.prototype.rect=function(ca,ea,na,ra){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(ca,ea,na,ra,this.getStyle(!0,!0)))};q.prototype.ellipse=function(ca,ea,na,ra){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(ca+
+na/2,ea+ra/2,na,ra,this.getStyle(!0,!0)))};q.prototype.roundrect=function(ca,ea,na,ra,ya,va){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(ca+ya,ea),this.lineTo(ca+na-ya,ea),this.quadTo(ca+na,ea,ca+na,ea+va),this.lineTo(ca+na,ea+ra-va),this.quadTo(ca+na,ea+ra,ca+na-ya,ea+ra),this.lineTo(ca+ya,ea+ra),this.quadTo(ca,ea+ra,ca,ea+ra-va),this.lineTo(ca,ea+va),this.quadTo(ca,ea,ca+ya,ea))};q.prototype.drawPath=function(ca){if(0<this.path.length){this.passThrough=
+!0;try{this.rc.path(this.path.join(" "),ca)}catch(na){}this.passThrough=!1}else if(null!=this.nextShape){for(var ea in ca)this.nextShape.options[ea]=ca[ea];ca.stroke!=mxConstants.NONE&&null!=ca.stroke||delete this.nextShape.options.stroke;ca.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};q.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};q.prototype.fill=
+function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};q.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};q.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=
+this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(ca){return new q(ca,Editor.createRoughCanvas(ca),this)};var F=mxShape.prototype.createHandJiggle;
+mxShape.prototype.createHandJiggle=function(ca){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?F.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(ca):this.createRoughCanvas(ca)};var S=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(ca,ea,na,ra,ya){null!=ca.handJiggle&&ca.handJiggle.passThrough||S.apply(this,arguments)};var ba=mxShape.prototype.paint;mxShape.prototype.paint=
+function(ca){var ea=ca.addTolerance,na=!0;null!=this.style&&(na="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=ca.handJiggle&&ca.handJiggle.constructor==q&&!this.outline){ca.save();var ra=this.fill,ya=this.stroke;this.stroke=this.fill=null;var va=this.configurePointerEvents,Da=ca.setStrokeColor;ca.setStrokeColor=function(){};var pa=ca.setFillColor;ca.setFillColor=function(){};na||null==ra||(this.configurePointerEvents=function(){});ca.handJiggle.passThrough=!0;ba.apply(this,
+arguments);ca.handJiggle.passThrough=!1;ca.setFillColor=pa;ca.setStrokeColor=Da;this.configurePointerEvents=va;this.stroke=ya;this.fill=ra;ca.restore();na&&null!=ra&&(ca.addTolerance=function(){})}ba.apply(this,arguments);ca.addTolerance=ea};var U=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(ca,ea,na,ra,ya,va){null!=ca.handJiggle&&ca.handJiggle.constructor==q?(ca.handJiggle.passThrough=!0,U.apply(this,arguments),ca.handJiggle.passThrough=!1):U.apply(this,arguments)}})();
+Editor.fastCompress=function(q){return null==q||0==q.length||"undefined"===typeof pako?q:Graph.arrayBufferToString(pako.deflateRaw(q))};Editor.fastDecompress=function(q){return null==q||0==q.length||"undefined"===typeof pako?q:pako.inflateRaw(Graph.stringToArrayBuffer(atob(q)),{to:"string"})};Editor.extractGraphModel=function(q,F,S){if(null!=q&&"undefined"!==typeof pako){var ba=q.ownerDocument.getElementsByTagName("div"),U=[];if(null!=ba&&0<ba.length)for(var ca=0;ca<ba.length;ca++)if("mxgraph"==ba[ca].getAttribute("class")){U.push(ba[ca]);
+break}0<U.length&&(ba=U[0].getAttribute("data-mxgraph"),null!=ba?(U=JSON.parse(ba),null!=U&&null!=U.xml&&(q=mxUtils.parseXml(U.xml),q=q.documentElement)):(U=U[0].getElementsByTagName("div"),0<U.length&&(ba=mxUtils.getTextContent(U[0]),ba=Graph.decompress(ba,null,S),0<ba.length&&(q=mxUtils.parseXml(ba),q=q.documentElement))))}if(null!=q&&"svg"==q.nodeName)if(ba=q.getAttribute("content"),null!=ba&&"<"!=ba.charAt(0)&&"%"!=ba.charAt(0)&&(ba=unescape(window.atob?atob(ba):Base64.decode(cont,ba))),null!=
+ba&&"%"==ba.charAt(0)&&(ba=decodeURIComponent(ba)),null!=ba&&0<ba.length)q=mxUtils.parseXml(ba).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==q||F||(U=null,"diagram"==q.nodeName?U=q:"mxfile"==q.nodeName&&(ba=q.getElementsByTagName("diagram"),0<ba.length&&(U=ba[Math.max(0,Math.min(ba.length-1,urlParams.page||0))])),null!=U&&(q=Editor.parseDiagramNode(U,S)));null==q||"mxGraphModel"==q.nodeName||F&&"mxfile"==q.nodeName||(q=null);return q};Editor.parseDiagramNode=function(q,
+F){var S=mxUtils.trim(mxUtils.getTextContent(q)),ba=null;0<S.length?(q=Graph.decompress(S,null,F),null!=q&&0<q.length&&(ba=mxUtils.parseXml(q).documentElement)):(q=mxUtils.getChildNodes(q),0<q.length&&(ba=mxUtils.createXmlDocument(),ba.appendChild(ba.importNode(q[0],!0)),ba=ba.documentElement));return ba};Editor.getDiagramNodeXml=function(q){var F=mxUtils.getTextContent(q),S=null;0<F.length?S=Graph.decompress(F):null!=q.firstChild&&(S=mxUtils.getXml(q.firstChild));return S};Editor.extractGraphModelFromPdf=
+function(q){q=q.substring(q.indexOf(",")+1);q=window.atob&&!mxClient.IS_SF?atob(q):Base64.decode(q,!0);if("%PDF-1.7"==q.substring(0,8)){var F=q.indexOf("EmbeddedFile");if(-1<F){var S=q.indexOf("stream",F)+9;if(0<q.substring(F,S).indexOf("application#2Fvnd.jgraph.mxfile"))return F=q.indexOf("endstream",S-1),pako.inflateRaw(Graph.stringToArrayBuffer(q.substring(S,F)),{to:"string"})}return null}S=null;F="";for(var ba=0,U=0,ca=[],ea=null;U<q.length;){var na=q.charCodeAt(U);U+=1;10!=na&&(F+=String.fromCharCode(na));
+na=="/Subject (%3Cmxfile".charCodeAt(ba)?ba++:ba=0;if(19==ba){var ra=q.indexOf("%3C%2Fmxfile%3E)",U)+15;U-=9;if(ra>U){S=q.substring(U,ra);break}}10==na&&("endobj"==F?ea=null:"obj"==F.substring(F.length-3,F.length)||"xref"==F||"trailer"==F?(ea=[],ca[F.split(" ")[0]]=ea):null!=ea&&ea.push(F),F="")}null==S&&(S=Editor.extractGraphModelFromXref(ca));null!=S&&(S=decodeURIComponent(S.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return S};Editor.extractGraphModelFromXref=function(q){var F=q.trailer,S=null;
+null!=F&&(F=/.* \/Info (\d+) (\d+) R/g.exec(F.join("\n")),null!=F&&0<F.length&&(F=q[F[1]],null!=F&&(F=/.* \/Subject (\d+) (\d+) R/g.exec(F.join("\n")),null!=F&&0<F.length&&(q=q[F[1]],null!=q&&(q=q.join("\n"),S=q.substring(1,q.length-1))))));return S};Editor.extractParserError=function(q,F){var S=null;q=null!=q?q.getElementsByTagName("parsererror"):null;null!=q&&0<q.length&&(S=F||mxResources.get("invalidChars"),F=q[0].getElementsByTagName("div"),0<F.length&&(S=mxUtils.getTextContent(F[0])));return null!=
+S?mxUtils.trim(S):S};Editor.addRetryToError=function(q,F){null!=q&&(q=null!=q.error?q.error:q,null==q.retry&&(q.retry=F))};Editor.configure=function(q){if(null!=q){Editor.config=q;Editor.configVersion=q.version;Menus.prototype.defaultFonts=q.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=q.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=q.defaultColors||ColorDialog.prototype.defaultColors;ColorDialog.prototype.colorNames=q.colorNames||
+ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=q.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=q.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=q.autosaveDelay||DrawioFile.prototype.autosaveDelay;q.debug&&(urlParams.test="1");null!=q.templateFile&&(EditorUi.templateFile=q.templateFile);null!=q.styles&&(Array.isArray(q.styles)?Editor.styles=q.styles:EditorUi.debug("Configuration Error: Array expected for styles"));
+null!=q.globalVars&&(Editor.globalVars=q.globalVars);null!=q.compressXml&&(Editor.compressXml=q.compressXml);null!=q.includeDiagram&&(Editor.defaultIncludeDiagram=q.includeDiagram);null!=q.simpleLabels&&(Editor.simpleLabels=q.simpleLabels);null!=q.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=q.oneDriveInlinePicker);null!=q.darkColor&&(Editor.darkColor=q.darkColor);null!=q.lightColor&&(Editor.lightColor=q.lightColor);null!=q.settingsName&&(Editor.configurationKey="."+q.settingsName+"-configuration",
+Editor.settingsKey="."+q.settingsName+"-config",mxSettings.key=Editor.settingsKey);q.customFonts&&(Menus.prototype.defaultFonts=q.customFonts.concat(Menus.prototype.defaultFonts));q.customPresetColors&&(ColorDialog.prototype.presetColors=q.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=q.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=q.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=q.css){var F=document.createElement("style");
+F.setAttribute("type","text/css");F.appendChild(document.createTextNode(q.css));var S=document.getElementsByTagName("script")[0];S.parentNode.insertBefore(F,S)}null!=q.libraries&&(Sidebar.prototype.customEntries=q.libraries);null!=q.enabledLibraries&&(Array.isArray(q.enabledLibraries)?Sidebar.prototype.enabledLibraries=q.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=q.defaultLibraries&&(Sidebar.prototype.defaultEntries=q.defaultLibraries);null!=
+q.defaultCustomLibraries&&(Editor.defaultCustomLibraries=q.defaultCustomLibraries);null!=q.enableCustomLibraries&&(Editor.enableCustomLibraries=q.enableCustomLibraries);null!=q.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=q.defaultVertexStyle);null!=q.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=q.defaultEdgeStyle);null!=q.defaultPageVisible&&(Graph.prototype.defaultPageVisible=q.defaultPageVisible);null!=q.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=q.defaultGridEnabled);
+null!=q.zoomWheel&&(Graph.zoomWheel=q.zoomWheel);null!=q.zoomFactor&&(F=parseFloat(q.zoomFactor),!isNaN(F)&&1<F?Graph.prototype.zoomFactor=F:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=q.gridSteps&&(F=parseInt(q.gridSteps),!isNaN(F)&&0<F?mxGraphView.prototype.gridSteps=F:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));null!=q.pageFormat&&(F=parseInt(q.pageFormat.width),S=parseInt(q.pageFormat.height),!isNaN(F)&&0<F&&!isNaN(S)&&0<S?(mxGraph.prototype.defaultPageFormat=
+new mxRectangle(0,0,F,S),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));q.thumbWidth&&(Sidebar.prototype.thumbWidth=q.thumbWidth);q.thumbHeight&&(Sidebar.prototype.thumbHeight=q.thumbHeight);q.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=q.emptyLibraryXml);q.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=q.emptyDiagramXml);q.sidebarWidth&&(EditorUi.prototype.hsplitPosition=q.sidebarWidth);
+q.sidebarTitles&&(Sidebar.prototype.sidebarTitles=q.sidebarTitles);q.sidebarTitleSize&&(F=parseInt(q.sidebarTitleSize),!isNaN(F)&&0<F?Sidebar.prototype.sidebarTitleSize=F:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));q.fontCss&&("string"===typeof q.fontCss?Editor.configureFontCss(q.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=q.autosaveDelay&&(F=parseInt(q.autosaveDelay),!isNaN(F)&&0<F?DrawioFile.prototype.autosaveDelay=F:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));
+null!=q.maxImageBytes&&(EditorUi.prototype.maxImageBytes=q.maxImageBytes);null!=q.maxImageSize&&(EditorUi.prototype.maxImageSize=q.maxImageSize);null!=q.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=q.shareCursorPosition);null!=q.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=q.showRemoteCursors)}};Editor.configureFontCss=function(q){if(null!=q){Editor.prototype.fontCss=q;var F=document.getElementsByTagName("script")[0];if(null!=F&&null!=F.parentNode){var S=document.createElement("style");
+S.setAttribute("type","text/css");S.appendChild(document.createTextNode(q));F.parentNode.insertBefore(S,F);q=q.split("url(");for(S=1;S<q.length;S++){var ba=q[S].indexOf(")");ba=Editor.trimCssUrl(q[S].substring(0,ba));var U=document.createElement("link");U.setAttribute("rel","preload");U.setAttribute("href",ba);U.setAttribute("as","font");U.setAttribute("crossorigin","");F.parentNode.insertBefore(U,F)}}}};Editor.trimCssUrl=function(q){return q.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$",
+"g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(q){q=null!=q?q:Editor.GUID_LENGTH;for(var F=[],S=0;S<q;S++)F.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return F.join("")};Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=
+!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(q){q=null!=q&&"mxlibrary"!=q.nodeName?this.extractGraphModel(q):null;if(null!=q){var F=Editor.extractParserError(q,mxResources.get("invalidOrMissingFile"));if(F)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[q],"cause",[F]),Error(mxResources.get("notADiagramFile")+" ("+F+")");if("mxGraphModel"==q.nodeName){F=q.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=F&&""!=
+F)F!=this.graph.currentStyle&&(S=null!=this.graph.themes?this.graph.themes[F]:mxUtils.load(STYLE_PATH+"/"+F+".xml").getDocumentElement(),null!=S&&(ba=new mxCodec(S.ownerDocument),ba.decode(S,this.graph.getStylesheet())));else{var S=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=S){var ba=new mxCodec(S.ownerDocument);ba.decode(S,this.graph.getStylesheet())}}this.graph.currentStyle=F;this.graph.mathEnabled="1"==urlParams.math||
+"1"==q.getAttribute("math");F=q.getAttribute("backgroundImage");null!=F?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(F)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==q.getAttribute("shadow"),!1);if(F=q.getAttribute("extFonts"))try{for(F=F.split("|").map(function(U){U=U.split("^");return{name:U[0],url:U[1]}}),S=0;S<F.length;S++)this.graph.addExtFont(F[S].name,
+F[S].url)}catch(U){console.log("ExtFonts format error: "+U.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var d=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(q,F){q=null!=q?q:!0;var S=d.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&S.setAttribute("style",
+this.graph.currentStyle);var ba=this.graph.getBackgroundImageObject(this.graph.backgroundImage,F);null!=ba&&S.setAttribute("backgroundImage",JSON.stringify(ba));S.setAttribute("math",this.graph.mathEnabled?"1":"0");S.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(ba=this.graph.extFonts.map(function(U){return U.name+"^"+U.url}),S.setAttribute("extFonts",ba.join("|")));return S};Editor.prototype.isDataSvg=function(q){try{var F=mxUtils.parseXml(q).documentElement.getAttribute("content");
+if(null!=F&&(null!=F&&"<"!=F.charAt(0)&&"%"!=F.charAt(0)&&(F=unescape(window.atob?atob(F):Base64.decode(cont,F))),null!=F&&"%"==F.charAt(0)&&(F=decodeURIComponent(F)),null!=F&&0<F.length)){var S=mxUtils.parseXml(F).documentElement;return"mxfile"==S.nodeName||"mxGraphModel"==S.nodeName}}catch(ba){}return!1};Editor.prototype.extractGraphModel=function(q,F,S){return Editor.extractGraphModel.apply(this,arguments)};var g=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled=
+"1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();g.apply(this,arguments)};var l=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){l.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=
+function(q,F){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){q=null!=q?q:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(U){try{MathJax.typesetClear([U]),MathJax.typeset([U]),Editor.onMathJaxDone()}catch(ca){MathJax.typesetClear([U]),null!=ca.retry?ca.retry.then(function(){MathJax.typesetPromise([U]).then(Editor.onMathJaxDone)}):null!=window.console&&console.log("Error in MathJax: "+ca.toString())}};window.MathJax=null!=F?F:{options:{skipHtmlTags:{"[+]":["text"]}},
+loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var U=0;U<Editor.mathJaxQueue.length;U++)Editor.doMathJaxRender(Editor.mathJaxQueue[U])}}};Editor.MathJaxRender=function(U){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(U):Editor.mathJaxQueue.push(U)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};Editor.onMathJaxDone=function(){};var S=Editor.prototype.init;
+Editor.prototype.init=function(){S.apply(this,arguments);var U=mxUtils.bind(this,function(ca,ea){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,U);this.graph.addListener(mxEvent.REFRESH,U)};F=document.getElementsByTagName("script");if(null!=F&&0<F.length){var ba=document.createElement("script");ba.setAttribute("type","text/javascript");ba.setAttribute("src",q);F[0].parentNode.appendChild(ba)}}};
+Editor.prototype.csvToArray=function(q){if(0<q.length){var F="",S=[""],ba=0,U=!0,ca;q=$jscomp.makeIterator(q);for(ca=q.next();!ca.done;ca=q.next())ca=ca.value,'"'===ca?(U&&ca===F&&(S[ba]+=ca),U=!U):","===ca&&U?ca=S[++ba]="":S[ba]+=ca,F=ca;return S}return[]};Editor.prototype.getProxiedUrl=function(q){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(q)){var F=/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q);
+F=/\.png$/i.test(q)||/\.pdf$/i.test(q)||F;var S="t="+(new Date).getTime();q=PROXY_URL+"?url="+encodeURIComponent(q)+"&"+S+(F?"&base64=1":"")}return q};Editor.prototype.isCorsEnabledForUrl=function(q){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||q.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(q)||"https://raw.githubusercontent.com/"===
+q.substring(0,34)||"https://fonts.googleapis.com/"===q.substring(0,29)||"https://fonts.gstatic.com/"===q.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var q=new mxUrlConverter;q.updateBaseUrl();var F=q.convert,S=this;q.convert=function(ba){if(null!=ba){var U="http://"==ba.substring(0,7)||"https://"==ba.substring(0,8);U&&!navigator.onLine?ba=Editor.svgBrokenImage.src:!U||ba.substring(0,q.baseUrl.length)==q.baseUrl||S.crossOriginImages&&S.isCorsEnabledForUrl(ba)?"chrome-extension://"==
+ba.substring(0,19)||mxClient.IS_CHROMEAPP||(ba=F.apply(this,arguments)):ba=PROXY_URL+"?url="+encodeURIComponent(ba)}return ba};return q};Editor.createSvgDataUri=function(q){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(q)))};Editor.prototype.convertImageToDataUri=function(q,F){try{var S=!0,ba=window.setTimeout(mxUtils.bind(this,function(){S=!1;F(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(q))mxUtils.get(q,mxUtils.bind(this,function(ca){window.clearTimeout(ba);
+S&&F(Editor.createSvgDataUri(ca.getText()))}),function(){window.clearTimeout(ba);S&&F(Editor.svgBrokenImage.src)});else{var U=new Image;this.crossOriginImages&&(U.crossOrigin="anonymous");U.onload=function(){window.clearTimeout(ba);if(S)try{var ca=document.createElement("canvas"),ea=ca.getContext("2d");ca.height=U.height;ca.width=U.width;ea.drawImage(U,0,0);F(ca.toDataURL())}catch(na){F(Editor.svgBrokenImage.src)}};U.onerror=function(){window.clearTimeout(ba);S&&F(Editor.svgBrokenImage.src)};U.src=
+q}}catch(ca){F(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(q,F,S,ba){null==ba&&(ba=this.createImageUrlConverter());var U=0,ca=S||{};S=mxUtils.bind(this,function(ea,na){ea=q.getElementsByTagName(ea);for(var ra=0;ra<ea.length;ra++)mxUtils.bind(this,function(ya){try{if(null!=ya){var va=ba.convert(ya.getAttribute(na));if(null!=va&&"data:"!=va.substring(0,5)){var Da=ca[va];null==Da?(U++,this.convertImageToDataUri(va,function(pa){null!=pa&&(ca[va]=pa,ya.setAttribute(na,pa));U--;
+0==U&&F(q)})):ya.setAttribute(na,Da)}else null!=va&&ya.setAttribute(na,va)}}catch(pa){}})(ea[ra])});S("image","xlink:href");S("img","src");0==U&&F(q)};Editor.base64Encode=function(q){for(var F="",S=0,ba=q.length,U,ca,ea;S<ba;){U=q.charCodeAt(S++)&255;if(S==ba){F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(U>>2);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((U&3)<<4);F+="==";break}ca=q.charCodeAt(S++);if(S==ba){F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(U>>
+2);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((U&3)<<4|(ca&240)>>4);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((ca&15)<<2);F+="=";break}ea=q.charCodeAt(S++);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(U>>2);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((U&3)<<4|(ca&240)>>4);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((ca&15)<<2|(ea&192)>>
+6);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(ea&63)}return F};Editor.prototype.loadUrl=function(q,F,S,ba,U,ca,ea,na){try{var ra=!ea&&(ba||/(\.png)($|\?)/i.test(q)||/(\.jpe?g)($|\?)/i.test(q)||/(\.gif)($|\?)/i.test(q)||/(\.pdf)($|\?)/i.test(q));U=null!=U?U:!0;var ya=mxUtils.bind(this,function(){mxUtils.get(q,mxUtils.bind(this,function(va){if(200<=va.getStatus()&&299>=va.getStatus()){if(null!=F){var Da=va.getText();if(ra){if((9==document.documentMode||10==document.documentMode)&&
+"undefined"!==typeof window.mxUtilsBinaryToArray){va=mxUtilsBinaryToArray(va.request.responseBody).toArray();Da=Array(va.length);for(var pa=0;pa<va.length;pa++)Da[pa]=String.fromCharCode(va[pa]);Da=Da.join("")}ca=null!=ca?ca:"data:image/png;base64,";Da=ca+Editor.base64Encode(Da)}F(Da)}}else null!=S&&(0==va.getStatus()?S({message:mxResources.get("accessDenied")},va):404==va.getStatus()?S({code:va.getStatus()},va):S({message:mxResources.get("error")+" "+va.getStatus()},va))}),function(va){null!=S&&
+S({message:mxResources.get("error")+" "+va.getStatus()})},ra,this.timeout,function(){U&&null!=S&&S({code:App.ERROR_TIMEOUT,retry:ya})},na)});ya()}catch(va){null!=S&&S(va)}};Editor.prototype.absoluteCssFonts=function(q){var F=null;if(null!=q){var S=q.split("url(");if(0<S.length){F=[S[0]];q=window.location.pathname;var ba=null!=q?q.lastIndexOf("/"):-1;0<=ba&&(q=q.substring(0,ba+1));ba=document.getElementsByTagName("base");var U=null;null!=ba&&0<ba.length&&(U=ba[0].getAttribute("href"));for(var ca=1;ca<
+S.length;ca++)if(ba=S[ca].indexOf(")"),0<ba){var ea=Editor.trimCssUrl(S[ca].substring(0,ba));this.graph.isRelativeUrl(ea)&&(ea=null!=U?U+ea:window.location.protocol+"//"+window.location.hostname+("/"==ea.charAt(0)?"":q)+ea);F.push('url("'+ea+'"'+S[ca].substring(ba))}else F.push(S[ca])}else F=[q]}return null!=F?F.join(""):null};Editor.prototype.mapFontUrl=function(q,F,S){/^https?:\/\//.test(F)&&!this.isCorsEnabledForUrl(F)&&(F=PROXY_URL+"?url="+encodeURIComponent(F));S(q,F)};Editor.prototype.embedCssFonts=
+function(q,F){var S=q.split("url("),ba=0;null==this.cachedFonts&&(this.cachedFonts={});var U=mxUtils.bind(this,function(){if(0==ba){for(var ra=[S[0]],ya=1;ya<S.length;ya++){var va=S[ya].indexOf(")");ra.push('url("');ra.push(this.cachedFonts[Editor.trimCssUrl(S[ya].substring(0,va))]);ra.push('"'+S[ya].substring(va))}F(ra.join(""))}});if(0<S.length){for(q=1;q<S.length;q++){var ca=S[q].indexOf(")"),ea=null,na=S[q].indexOf("format(",ca);0<na&&(ea=Editor.trimCssUrl(S[q].substring(na+7,S[q].indexOf(")",
+na))));mxUtils.bind(this,function(ra){if(null==this.cachedFonts[ra]){this.cachedFonts[ra]=ra;ba++;var ya="application/x-font-ttf";if("svg"==ea||/(\.svg)($|\?)/i.test(ra))ya="image/svg+xml";else if("otf"==ea||"embedded-opentype"==ea||/(\.otf)($|\?)/i.test(ra))ya="application/x-font-opentype";else if("woff"==ea||/(\.woff)($|\?)/i.test(ra))ya="application/font-woff";else if("woff2"==ea||/(\.woff2)($|\?)/i.test(ra))ya="application/font-woff2";else if("eot"==ea||/(\.eot)($|\?)/i.test(ra))ya="application/vnd.ms-fontobject";
+else if("sfnt"==ea||/(\.sfnt)($|\?)/i.test(ra))ya="application/font-sfnt";this.mapFontUrl(ya,ra,mxUtils.bind(this,function(va,Da){this.loadUrl(Da,mxUtils.bind(this,function(pa){this.cachedFonts[ra]=pa;ba--;U()}),mxUtils.bind(this,function(pa){ba--;U()}),!0,null,"data:"+va+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(S[q].substring(0,ca)),ea)}U()}else F(q)};Editor.prototype.loadFonts=function(q){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(F){this.resolvedFontCss=
+F;null!=q&&q()})):null!=q&&q()};Editor.prototype.createGoogleFontCache=function(){var q={},F;for(F in Graph.fontMapping)Graph.isCssFontUrl(F)&&(q[F]=Graph.fontMapping[F]);return q};Editor.prototype.embedExtFonts=function(q){var F=this.graph.getCustomFonts();if(0<F.length){var S=[],ba=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var U=mxUtils.bind(this,function(){0==ba&&this.embedCssFonts(S.join(""),q)}),ca=0;ca<F.length;ca++)mxUtils.bind(this,function(ea,
+na){Graph.isCssFontUrl(na)?null==this.cachedGoogleFonts[na]?(ba++,this.loadUrl(na,mxUtils.bind(this,function(ra){this.cachedGoogleFonts[na]=ra;S.push(ra+"\n");ba--;U()}),mxUtils.bind(this,function(ra){ba--;S.push("@import url("+na+");\n");U()}))):S.push(this.cachedGoogleFonts[na]+"\n"):S.push('@font-face {font-family: "'+ea+'";src: url("'+na+'")}\n')})(F[ca].name,F[ca].url);U()}else q()};Editor.prototype.addMathCss=function(q){q=q.getElementsByTagName("defs");if(null!=q&&0<q.length)for(var F=document.getElementsByTagName("style"),
+S=0;S<F.length;S++){var ba=mxUtils.getTextContent(F[S]);0>ba.indexOf("mxPageSelector")&&0<ba.indexOf("MathJax")&&q[0].appendChild(F[S].cloneNode(!0))}};Editor.prototype.addFontCss=function(q,F){F=null!=F?F:this.absoluteCssFonts(this.fontCss);if(null!=F){var S=q.getElementsByTagName("defs"),ba=q.ownerDocument;0==S.length?(S=null!=ba.createElementNS?ba.createElementNS(mxConstants.NS_SVG,"defs"):ba.createElement("defs"),null!=q.firstChild?q.insertBefore(S,q.firstChild):q.appendChild(S)):S=S[0];q=null!=
+ba.createElementNS?ba.createElementNS(mxConstants.NS_SVG,"style"):ba.createElement("style");q.setAttribute("type","text/css");mxUtils.setTextContent(q,F);S.appendChild(q)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(q,F,S){var ba=mxClient.IS_FF?8192:16384;return Math.min(S,Math.min(ba/q,ba/F))};Editor.prototype.exportToCanvas=function(q,F,S,ba,U,ca,ea,na,ra,ya,va,Da,pa,Aa,xa,Ma,Oa,Na){try{ca=null!=
+ca?ca:!0;ea=null!=ea?ea:!0;Da=null!=Da?Da:this.graph;pa=null!=pa?pa:0;var La=ra?null:Da.background;La==mxConstants.NONE&&(La=null);null==La&&(La=ba);null==La&&0==ra&&(La=Ma?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(Da.getSvg(null,null,pa,Aa,null,ea,null,null,null,ya,null,Ma,Oa,Na),mxUtils.bind(this,function(Ba){try{var ab=new Image;ab.onload=mxUtils.bind(this,function(){try{var x=function(){mxClient.IS_SF?window.setTimeout(function(){Z.drawImage(ab,0,0);q(H,Ba)},0):(Z.drawImage(ab,
+0,0),q(H,Ba))},H=document.createElement("canvas"),P=parseInt(Ba.getAttribute("width")),X=parseInt(Ba.getAttribute("height"));na=null!=na?na:1;null!=F&&(na=ca?Math.min(1,Math.min(3*F/(4*X),F/P)):F/P);na=this.getMaxCanvasScale(P,X,na);P=Math.ceil(na*P);X=Math.ceil(na*X);H.setAttribute("width",P);H.setAttribute("height",X);var Z=H.getContext("2d");null!=La&&(Z.beginPath(),Z.rect(0,0,P,X),Z.fillStyle=La,Z.fill());1!=na&&Z.scale(na,na);if(xa){var fa=Da.view,la=fa.scale;fa.scale=1;var za=btoa(unescape(encodeURIComponent(fa.createSvgGrid(fa.gridColor))));
+fa.scale=la;za="data:image/svg+xml;base64,"+za;var ua=Da.gridSize*fa.gridSteps*na,oa=Da.getGraphBounds(),ta=fa.translate.x*la,Ea=fa.translate.y*la,Fa=ta+(oa.x-ta)/la-pa,Pa=Ea+(oa.y-Ea)/la-pa,Ra=new Image;Ra.onload=function(){try{for(var Ca=-Math.round(ua-mxUtils.mod((ta-Fa)*na,ua)),Ja=-Math.round(ua-mxUtils.mod((Ea-Pa)*na,ua));Ca<P;Ca+=ua)for(var Qa=Ja;Qa<X;Qa+=ua)Z.drawImage(Ra,Ca/na,Qa/na);x()}catch($a){null!=U&&U($a)}};Ra.onerror=function(Ca){null!=U&&U(Ca)};Ra.src=za}else x()}catch(Ca){null!=
+U&&U(Ca)}});ab.onerror=function(x){null!=U&&U(x)};ya&&this.graph.addSvgShadow(Ba);this.graph.mathEnabled&&this.addMathCss(Ba);var Xa=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(Ba,this.resolvedFontCss),ab.src=Editor.createSvgDataUri(mxUtils.getXml(Ba))}catch(x){null!=U&&U(x)}});this.embedExtFonts(mxUtils.bind(this,function(x){try{null!=x&&this.addFontCss(Ba,x),this.loadFonts(Xa)}catch(H){null!=U&&U(H)}}))}catch(x){null!=U&&U(x)}}),S,va)}catch(Ba){null!=U&&U(Ba)}};
+Editor.crcTable=[];for(var D=0;256>D;D++)for(var p=D,E=0;8>E;E++)p=1==(p&1)?3988292384^p>>>1:p>>>1,Editor.crcTable[D]=p;Editor.updateCRC=function(q,F,S,ba){for(var U=0;U<ba;U++)q=Editor.crcTable[(q^F.charCodeAt(S+U))&255]^q>>>8;return q};Editor.crc32=function(q){for(var F=-1,S=0;S<q.length;S++)F=F>>>8^Editor.crcTable[(F^q.charCodeAt(S))&255];return(F^-1)>>>0};Editor.writeGraphModelToPng=function(q,F,S,ba,U){function ca(va,Da){var pa=ra;ra+=Da;return va.substring(pa,ra)}function ea(va){va=ca(va,4);
+return va.charCodeAt(3)+(va.charCodeAt(2)<<8)+(va.charCodeAt(1)<<16)+(va.charCodeAt(0)<<24)}function na(va){return String.fromCharCode(va>>24&255,va>>16&255,va>>8&255,va&255)}q=q.substring(q.indexOf(",")+1);q=window.atob?atob(q):Base64.decode(q,!0);var ra=0;if(ca(q,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=U&&U();else if(ca(q,4),"IHDR"!=ca(q,4))null!=U&&U();else{ca(q,17);U=q.substring(0,ra);do{var ya=ea(q);if("IDAT"==ca(q,4)){U=q.substring(0,ra-8);"pHYs"==F&&"dpi"==
+S?(S=Math.round(ba/.0254),S=na(S)+na(S)+String.fromCharCode(1)):S=S+String.fromCharCode(0)+("zTXt"==F?String.fromCharCode(0):"")+ba;ba=4294967295;ba=Editor.updateCRC(ba,F,0,4);ba=Editor.updateCRC(ba,S,0,S.length);U+=na(S.length)+F+S+na(ba^4294967295);U+=q.substring(ra-8,q.length);break}U+=q.substring(ra-8,ra-4+ya);ca(q,ya);ca(q,4)}while(ya);return"data:image/png;base64,"+(window.btoa?btoa(U):Base64.encode(U,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";
+var N=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(q,F){N.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var R=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){R.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(q,F){var S=null;null!=q.editor.graph.getModel().getParent(F)?S=F.getId():null!=q.currentPage&&
+(S=q.currentPage.getId());return S});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 M=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?M.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var q=this.editorUi.getCurrentFile();
+return"1"==urlParams.embed||null!=q&&q.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(q){return!1};var Q=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(q){q=Q.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var F=this.editorUi,S=F.editor.graph,ba=this.createOption(mxResources.get("shadow"),function(){return S.shadowVisible},function(U){var ca=new ChangePageSetup(F);ca.ignoreColor=!0;
+ca.ignoreImage=!0;ca.shadowVisible=U;S.model.execute(ca)},{install:function(U){this.listener=function(){U(S.shadowVisible)};F.addListener("shadowVisibleChanged",this.listener)},destroy:function(){F.removeListener(this.listener)}});Editor.enableShadowOption||(ba.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(ba,60));q.appendChild(ba)}return q};var e=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(q){q=e.apply(this,arguments);
+var F=this.editorUi,S=F.editor.graph;if(S.isEnabled()){var ba=F.getCurrentFile();if(null!=ba&&ba.isAutosaveOptional()){var U=this.createOption(mxResources.get("autosave"),function(){return F.editor.autosave},function(ea){F.editor.setAutosave(ea);F.editor.autosave&&ba.isModified()&&ba.fileChanged()},{install:function(ea){this.listener=function(){ea(F.editor.autosave)};F.editor.addListener("autosaveChanged",this.listener)},destroy:function(){F.editor.removeListener(this.listener)}});q.appendChild(U)}}if(this.isMathOptionVisible()&&
+S.isEnabled()&&"undefined"!==typeof MathJax){U=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return S.mathEnabled},function(ea){F.actions.get("mathematicalTypesetting").funct()},{install:function(ea){this.listener=function(){ea(S.mathEnabled)};F.addListener("mathEnabledChanged",this.listener)},destroy:function(){F.removeListener(this.listener)}});U.style.paddingTop="5px";q.appendChild(U);var ca=F.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");ca.style.position=
+"relative";ca.style.marginLeft="6px";ca.style.top="2px";U.appendChild(ca)}return q};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=
+[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",
+dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
+{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=
+[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",dispName:"Left Line",type:"float",min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.cube.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",
+type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.step.prototype.customProperties=[{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20},{name:"fixedSize",dispName:"Fixed Size",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.trapezoid.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",
+type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.tape.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.4}];mxCellRenderer.defaultShapes.note.prototype.customProperties=[{name:"size",dispName:"Fold Size",type:"float",min:0,defVal:30},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.card.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
+{name:"size",dispName:"Cutoff Size",type:"float",min:0,defVal:30}];mxCellRenderer.defaultShapes.callout.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"base",dispName:"Callout Width",type:"float",min:0,defVal:20},{name:"size",dispName:"Callout Length",type:"float",min:0,defVal:30},{name:"position",dispName:"Callout Position",type:"float",min:0,max:1,defVal:.5},{name:"position2",dispName:"Callout Tip Position",type:"float",
+min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.folder.prototype.customProperties=[{name:"tabWidth",dispName:"Tab Width",type:"float"},{name:"tabHeight",dispName:"Tab Height",type:"float"},{name:"tabPosition",dispName:"Tap Position",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"right",dispName:"Right"}]}];mxCellRenderer.defaultShapes.swimlane.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"startSize",dispName:"Header Size",type:"float"},
+{name:"swimlaneHead",dispName:"Head Border",type:"bool",defVal:!0},{name:"swimlaneBody",dispName:"Body Border",type:"bool",defVal:!0},{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},{name:"separatorColor",dispName:"Separator Color",type:"color",defVal:null}];mxCellRenderer.defaultShapes.table.prototype.customProperties=[{name:"rowLines",dispName:"Row Lines",type:"bool",defVal:!0},{name:"columnLines",dispName:"Column Lines",type:"bool",defVal:!0},{name:"fixedRows",dispName:"Fixed Rows",
+type:"bool",defVal:!1},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",defVal:!1},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",defVal:!1}].concat(mxCellRenderer.defaultShapes.swimlane.prototype.customProperties).concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);mxCellRenderer.defaultShapes.tableRow.prototype.customProperties=mxCellRenderer.defaultShapes.swimlane.prototype.customProperties.concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);
+mxCellRenderer.defaultShapes.doubleEllipse.prototype.customProperties=[{name:"margin",dispName:"Indent",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.ext.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"double",dispName:"Double",type:"bool",defVal:!1},{name:"margin",dispName:"Indent",type:"float",min:0,defVal:0}];mxCellRenderer.defaultShapes.curlyBracket.prototype.customProperties=[{name:"rounded",dispName:"Rounded",type:"bool",defVal:!0},
+{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.image.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.label.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0},{name:"imageAlign",dispName:"Image Align",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"center",dispName:"Center"},{val:"right",dispName:"Right"}],defVal:"left"},
+{name:"imageVerticalAlign",dispName:"Image Vertical Align",type:"enum",enumList:[{val:"top",dispName:"Top"},{val:"middle",dispName:"Middle"},{val:"bottom",dispName:"Bottom"}],defVal:"middle"},{name:"imageWidth",dispName:"Image Width",type:"float",min:0,defVal:24},{name:"imageHeight",dispName:"Image Height",type:"float",min:0,defVal:24},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:12},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.dataStorage.prototype.customProperties=
+[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.1}];mxCellRenderer.defaultShapes.manualInput.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:30},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.loopLimit.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.prototype.customProperties=
+[{name:"size",dispName:"Size",type:"float",min:0,defVal:38},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.display.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.singleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.doubleArrow.prototype.customProperties=
+[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.cross.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.corner.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.tee.prototype.customProperties=
+[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.umlLifeline.prototype.customProperties=[{name:"participant",dispName:"Participant",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName:"Actor"},{val:"umlBoundary",dispName:"Boundary"},{val:"umlEntity",dispName:"Entity"},{val:"umlControl",dispName:"Control"}]},{name:"size",dispName:"Height",type:"float",defVal:40,
+min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name:"width",dispName:"Title Width",type:"float",defVal:60,min:0},{name:"height",dispName:"Title Height",type:"float",defVal:30,min:0}];StyleFormatPanel.prototype.defaultColorSchemes=[[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",font:"#333333"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",
+stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",
+font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",
+stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},
+{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(q,F,S){if(null!=F){var ba=function(ca){if(null!=ca)if(S)for(var ea=0;ea<ca.length;ea++)F[ca[ea].name]=ca[ea];else for(var na in F){var ra=!1;for(ea=0;ea<ca.length;ea++)if(ca[ea].name==na&&ca[ea].type==F[na].type){ra=!0;break}ra||
+delete F[na]}},U=this.editorUi.editor.graph.view.getState(q);null!=U&&null!=U.shape&&(U.shape.commonCustomPropAdded||(U.shape.commonCustomPropAdded=!0,U.shape.customProperties=U.shape.customProperties||[],U.cell.vertex?Array.prototype.push.apply(U.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(U.shape.customProperties,Editor.commonEdgeProperties)),ba(U.shape.customProperties));q=q.getAttribute("customProperties");if(null!=q)try{ba(JSON.parse(q))}catch(ca){}}};var f=
+StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var q=this.editorUi.getSelectionState();"image"!=q.style.shape&&!q.containsLabel&&0<q.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));f.apply(this,arguments);if(Editor.enableCustomProperties){for(var F={},S=q.vertices,ba=q.edges,U=0;U<S.length;U++)this.findCommonProperties(S[U],F,0==U);for(U=0;U<ba.length;U++)this.findCommonProperties(ba[U],F,0==S.length&&0==U);null!=Object.getOwnPropertyNames&&
+0<Object.getOwnPropertyNames(F).length&&this.container.appendChild(this.addProperties(this.createPanel(),F,q))}};var k=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(q){this.addActions(q,["copyStyle","pasteStyle"]);return k.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(q,F,S){function ba(Z,fa,la,za){Da.getModel().beginUpdate();try{var ua=[],oa=[];if(null!=la.index){for(var ta=[],Ea=la.parentRow.nextSibling;Ea&&
+Ea.getAttribute("data-pName")==Z;)ta.push(Ea.getAttribute("data-pValue")),Ea=Ea.nextSibling;la.index<ta.length?null!=za?ta.splice(za,1):ta[la.index]=fa:ta.push(fa);null!=la.size&&ta.length>la.size&&(ta=ta.slice(0,la.size));fa=ta.join(",");null!=la.countProperty&&(Da.setCellStyles(la.countProperty,ta.length,Da.getSelectionCells()),ua.push(la.countProperty),oa.push(ta.length))}Da.setCellStyles(Z,fa,Da.getSelectionCells());ua.push(Z);oa.push(fa);if(null!=la.dependentProps)for(Z=0;Z<la.dependentProps.length;Z++){var Fa=
+la.dependentPropsDefVal[Z],Pa=la.dependentPropsVals[Z];if(Pa.length>fa)Pa=Pa.slice(0,fa);else for(var Ra=Pa.length;Ra<fa;Ra++)Pa.push(Fa);Pa=Pa.join(",");Da.setCellStyles(la.dependentProps[Z],Pa,Da.getSelectionCells());ua.push(la.dependentProps[Z]);oa.push(Pa)}if("function"==typeof la.onChange)la.onChange(Da,fa);va.editorUi.fireEvent(new mxEventObject("styleChanged","keys",ua,"values",oa,"cells",Da.getSelectionCells()))}finally{Da.getModel().endUpdate()}}function U(Z,fa,la){var za=mxUtils.getOffset(q,
+!0),ua=mxUtils.getOffset(Z,!0);fa.style.position="absolute";fa.style.left=ua.x-za.x+"px";fa.style.top=ua.y-za.y+"px";fa.style.width=Z.offsetWidth+"px";fa.style.height=Z.offsetHeight-(la?4:0)+"px";fa.style.zIndex=5}function ca(Z,fa,la){var za=document.createElement("div");za.style.width="32px";za.style.height="4px";za.style.margin="2px";za.style.border="1px solid black";za.style.background=fa&&"none"!=fa?fa:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(va,function(ua){this.editorUi.pickColor(fa,
+function(oa){za.style.background="none"==oa?"url('"+Dialog.prototype.noColorImage+"')":oa;ba(Z,oa,la)});mxEvent.consume(ua)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(za);return btn}function ea(Z,fa,la,za,ua,oa,ta){null!=fa&&(fa=fa.split(","),pa.push({name:Z,values:fa,type:la,defVal:za,countProperty:ua,parentRow:oa,isDeletable:!0,flipBkg:ta}));btn=mxUtils.button("+",mxUtils.bind(va,function(Ea){for(var Fa=oa,Pa=0;null!=Fa.nextSibling;)if(Fa.nextSibling.getAttribute("data-pName")==
+Z)Fa=Fa.nextSibling,Pa++;else break;var Ra={type:la,parentRow:oa,index:Pa,isDeletable:!0,defVal:za,countProperty:ua};Pa=ya(Z,"",Ra,0==Pa%2,ta);ba(Z,za,Ra);Fa.parentNode.insertBefore(Pa,Fa.nextSibling);mxEvent.consume(Ea)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function na(Z,fa,la,za,ua,oa,ta){if(0<ua){var Ea=Array(ua);fa=null!=fa?fa.split(","):[];for(var Fa=0;Fa<ua;Fa++)Ea[Fa]=null!=fa[Fa]?fa[Fa]:null!=za?za:"";pa.push({name:Z,values:Ea,type:la,defVal:za,
+parentRow:oa,flipBkg:ta,size:ua})}return document.createElement("div")}function ra(Z,fa,la){var za=document.createElement("input");za.type="checkbox";za.checked="1"==fa;mxEvent.addListener(za,"change",function(){ba(Z,za.checked?"1":"0",la)});return za}function ya(Z,fa,la,za,ua){var oa=la.dispName,ta=la.type,Ea=document.createElement("tr");Ea.className="gePropRow"+(ua?"Dark":"")+(za?"Alt":"")+" gePropNonHeaderRow";Ea.setAttribute("data-pName",Z);Ea.setAttribute("data-pValue",fa);za=!1;null!=la.index&&
+(Ea.setAttribute("data-index",la.index),oa=(null!=oa?oa:"")+"["+la.index+"]",za=!0);var Fa=document.createElement("td");Fa.className="gePropRowCell";oa=mxResources.get(oa,null,oa);mxUtils.write(Fa,oa);Fa.setAttribute("title",oa);za&&(Fa.style.textAlign="right");Ea.appendChild(Fa);Fa=document.createElement("td");Fa.className="gePropRowCell";if("color"==ta)Fa.appendChild(ca(Z,fa,la));else if("bool"==ta||"boolean"==ta)Fa.appendChild(ra(Z,fa,la));else if("enum"==ta){var Pa=la.enumList;for(ua=0;ua<Pa.length;ua++)if(oa=
+Pa[ua],oa.val==fa){mxUtils.write(Fa,mxResources.get(oa.dispName,null,oa.dispName));break}mxEvent.addListener(Fa,"click",mxUtils.bind(va,function(){var Ra=document.createElement("select");U(Fa,Ra);for(var Ca=0;Ca<Pa.length;Ca++){var Ja=Pa[Ca],Qa=document.createElement("option");Qa.value=mxUtils.htmlEntities(Ja.val);mxUtils.write(Qa,mxResources.get(Ja.dispName,null,Ja.dispName));Ra.appendChild(Qa)}Ra.value=fa;q.appendChild(Ra);mxEvent.addListener(Ra,"change",function(){var $a=mxUtils.htmlEntities(Ra.value);
+ba(Z,$a,la)});Ra.focus();mxEvent.addListener(Ra,"blur",function(){q.removeChild(Ra)})}))}else"dynamicArr"==ta?Fa.appendChild(ea(Z,fa,la.subType,la.subDefVal,la.countProperty,Ea,ua)):"staticArr"==ta?Fa.appendChild(na(Z,fa,la.subType,la.subDefVal,la.size,Ea,ua)):"readOnly"==ta?(ua=document.createElement("input"),ua.setAttribute("readonly",""),ua.value=fa,ua.style.width="96px",ua.style.borderWidth="0px",Fa.appendChild(ua)):(Fa.innerHTML=mxUtils.htmlEntities(decodeURIComponent(fa)),mxEvent.addListener(Fa,
+"click",mxUtils.bind(va,function(){function Ra(){var Ja=Ca.value;Ja=0==Ja.length&&"string"!=ta?0:Ja;la.allowAuto&&(null!=Ja.trim&&"auto"==Ja.trim().toLowerCase()?(Ja="auto",ta="string"):(Ja=parseFloat(Ja),Ja=isNaN(Ja)?0:Ja));null!=la.min&&Ja<la.min?Ja=la.min:null!=la.max&&Ja>la.max&&(Ja=la.max);Ja=encodeURIComponent(("int"==ta?parseInt(Ja):Ja)+"");ba(Z,Ja,la)}var Ca=document.createElement("input");U(Fa,Ca,!0);Ca.value=decodeURIComponent(fa);Ca.className="gePropEditor";"int"!=ta&&"float"!=ta||la.allowAuto||
+(Ca.type="number",Ca.step="int"==ta?"1":"any",null!=la.min&&(Ca.min=parseFloat(la.min)),null!=la.max&&(Ca.max=parseFloat(la.max)));q.appendChild(Ca);mxEvent.addListener(Ca,"keypress",function(Ja){13==Ja.keyCode&&Ra()});Ca.focus();mxEvent.addListener(Ca,"blur",function(){Ra()})})));la.isDeletable&&(ua=mxUtils.button("-",mxUtils.bind(va,function(Ra){ba(Z,"",la,la.index);mxEvent.consume(Ra)})),ua.style.height="16px",ua.style.width="25px",ua.style.float="right",ua.className="geColorBtn",Fa.appendChild(ua));
+Ea.appendChild(Fa);return Ea}var va=this,Da=this.editorUi.editor.graph,pa=[];q.style.position="relative";q.style.padding="0";var Aa=document.createElement("table");Aa.className="geProperties";Aa.style.whiteSpace="nowrap";Aa.style.width="100%";var xa=document.createElement("tr");xa.className="gePropHeader";var Ma=document.createElement("th");Ma.className="gePropHeaderCell";var Oa=document.createElement("img");Oa.src=Sidebar.prototype.expandedImage;Oa.style.verticalAlign="middle";Ma.appendChild(Oa);
+mxUtils.write(Ma,mxResources.get("property"));xa.style.cursor="pointer";var Na=function(){var Z=Aa.querySelectorAll(".gePropNonHeaderRow");if(va.editorUi.propertiesCollapsed){Oa.src=Sidebar.prototype.collapsedImage;var fa="none";for(var la=q.childNodes.length-1;0<=la;la--)try{var za=q.childNodes[la],ua=za.nodeName.toUpperCase();"INPUT"!=ua&&"SELECT"!=ua||q.removeChild(za)}catch(oa){}}else Oa.src=Sidebar.prototype.expandedImage,fa="";for(la=0;la<Z.length;la++)Z[la].style.display=fa};mxEvent.addListener(xa,
+"click",function(){va.editorUi.propertiesCollapsed=!va.editorUi.propertiesCollapsed;Na()});xa.appendChild(Ma);Ma=document.createElement("th");Ma.className="gePropHeaderCell";Ma.innerHTML=mxResources.get("value");xa.appendChild(Ma);Aa.appendChild(xa);var La=!1,Ba=!1;xa=null;1==S.vertices.length&&0==S.edges.length?xa=S.vertices[0].id:0==S.vertices.length&&1==S.edges.length&&(xa=S.edges[0].id);null!=xa&&Aa.appendChild(ya("id",mxUtils.htmlEntities(xa),{dispName:"ID",type:"readOnly"},!0,!1));for(var ab in F)if(xa=
+F[ab],"function"!=typeof xa.isVisible||xa.isVisible(S,this)){var Xa=null!=S.style[ab]?mxUtils.htmlEntities(S.style[ab]+""):null!=xa.getDefaultValue?xa.getDefaultValue(S,this):xa.defVal;if("separator"==xa.type)Ba=!Ba;else{if("staticArr"==xa.type)xa.size=parseInt(S.style[xa.sizeProperty]||F[xa.sizeProperty].defVal)||0;else if(null!=xa.dependentProps){var x=xa.dependentProps,H=[],P=[];for(Ma=0;Ma<x.length;Ma++){var X=S.style[x[Ma]];P.push(F[x[Ma]].subDefVal);H.push(null!=X?X.split(","):[])}xa.dependentPropsDefVal=
+P;xa.dependentPropsVals=H}Aa.appendChild(ya(ab,Xa,xa,La,Ba));La=!La}}for(Ma=0;Ma<pa.length;Ma++)for(xa=pa[Ma],F=xa.parentRow,S=0;S<xa.values.length;S++)ab=ya(xa.name,xa.values[S],{type:xa.type,parentRow:xa.parentRow,isDeletable:xa.isDeletable,index:S,defVal:xa.defVal,countProperty:xa.countProperty,size:xa.size},0==S%2,xa.flipBkg),F.parentNode.insertBefore(ab,F.nextSibling),F=ab;q.appendChild(Aa);Na();return q};StyleFormatPanel.prototype.addStyles=function(q){function F(xa){mxEvent.addListener(xa,
+"mouseenter",function(){xa.style.opacity="1"});mxEvent.addListener(xa,"mouseleave",function(){xa.style.opacity="0.5"})}var S=this.editorUi,ba=S.editor.graph,U=document.createElement("div");U.style.whiteSpace="nowrap";U.style.paddingLeft="24px";U.style.paddingRight="20px";q.style.paddingLeft="16px";q.style.paddingBottom="6px";q.style.position="relative";q.appendChild(U);var ca="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),
+ea=document.createElement("div");ea.style.whiteSpace="nowrap";ea.style.position="relative";ea.style.textAlign="center";ea.style.width="210px";for(var na=[],ra=0;ra<this.defaultColorSchemes.length;ra++){var ya=document.createElement("div");ya.style.display="inline-block";ya.style.width="6px";ya.style.height="6px";ya.style.marginLeft="4px";ya.style.marginRight="3px";ya.style.borderRadius="3px";ya.style.cursor="pointer";ya.style.background="transparent";ya.style.border="1px solid #b5b6b7";mxUtils.bind(this,
+function(xa){mxEvent.addListener(ya,"click",mxUtils.bind(this,function(){va(xa)}))})(ra);na.push(ya);ea.appendChild(ya)}var va=mxUtils.bind(this,function(xa){null!=na[xa]&&(null!=this.format.currentScheme&&null!=na[this.format.currentScheme]&&(na[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=xa,Da(this.defaultColorSchemes[this.format.currentScheme]),na[this.format.currentScheme].style.background="#84d7ff")}),Da=mxUtils.bind(this,function(xa){var Ma=mxUtils.bind(this,
+function(Na){var La=mxUtils.button("",mxUtils.bind(this,function(Xa){ba.getModel().beginUpdate();try{for(var x=S.getSelectionState().cells,H=0;H<x.length;H++){for(var P=ba.getModel().getStyle(x[H]),X=0;X<ca.length;X++)P=mxUtils.removeStylename(P,ca[X]);var Z=ba.getModel().isVertex(x[H])?ba.defaultVertexStyle:ba.defaultEdgeStyle;null!=Na?(mxEvent.isShiftDown(Xa)||(P=""==Na.fill?mxUtils.setStyle(P,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(P,mxConstants.STYLE_FILLCOLOR,Na.fill||mxUtils.getValue(Z,
+mxConstants.STYLE_FILLCOLOR,null)),P=mxUtils.setStyle(P,mxConstants.STYLE_GRADIENTCOLOR,Na.gradient||mxUtils.getValue(Z,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(Xa)||mxClient.IS_MAC&&mxEvent.isMetaDown(Xa)||!ba.getModel().isVertex(x[H])||(P=mxUtils.setStyle(P,mxConstants.STYLE_FONTCOLOR,Na.font||mxUtils.getValue(Z,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(Xa)||(P=""==Na.stroke?mxUtils.setStyle(P,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(P,mxConstants.STYLE_STROKECOLOR,
+Na.stroke||mxUtils.getValue(Z,mxConstants.STYLE_STROKECOLOR,null)))):(P=mxUtils.setStyle(P,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(Z,mxConstants.STYLE_FILLCOLOR,"#ffffff")),P=mxUtils.setStyle(P,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(Z,mxConstants.STYLE_STROKECOLOR,"#000000")),P=mxUtils.setStyle(P,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(Z,mxConstants.STYLE_GRADIENTCOLOR,null)),ba.getModel().isVertex(x[H])&&(P=mxUtils.setStyle(P,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(Z,mxConstants.STYLE_FONTCOLOR,
+null))));ba.getModel().setStyle(x[H],P)}}finally{ba.getModel().endUpdate()}}));La.className="geStyleButton";La.style.width="36px";La.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";La.style.margin="0px 6px 6px 0px";if(null!=Na){var Ba="1"==urlParams.sketch?"2px solid":"1px solid";null!=Na.border&&(Ba=Na.border);null!=Na.gradient?mxClient.IS_IE&&10>document.documentMode?La.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Na.fill+"', EndColorStr='"+Na.gradient+
+"', GradientType=0)":La.style.backgroundImage="linear-gradient("+Na.fill+" 0px,"+Na.gradient+" 100%)":Na.fill==mxConstants.NONE?La.style.background="url('"+Dialog.prototype.noColorImage+"')":La.style.backgroundColor=""==Na.fill?mxUtils.getValue(ba.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):Na.fill||mxUtils.getValue(ba.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");La.style.border=Na.stroke==mxConstants.NONE?
+Ba+" transparent":""==Na.stroke?Ba+" "+mxUtils.getValue(ba.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):Ba+" "+(Na.stroke||mxUtils.getValue(ba.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=Na.title&&La.setAttribute("title",Na.title)}else{Ba=mxUtils.getValue(ba.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var ab=mxUtils.getValue(ba.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,
+"#000000");La.style.backgroundColor=Ba;La.style.border="1px solid "+ab}La.style.borderRadius="0";U.appendChild(La)});U.innerText="";for(var Oa=0;Oa<xa.length;Oa++)0<Oa&&0==mxUtils.mod(Oa,4)&&mxUtils.br(U),Ma(xa[Oa])});null==this.format.currentScheme?va(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):va(this.format.currentScheme);ra=10>=this.defaultColorSchemes.length?28:8;var pa=document.createElement("div");pa.style.cssText="position:absolute;left:10px;top:8px;bottom:"+ra+"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(pa,"click",mxUtils.bind(this,function(){va(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var Aa=document.createElement("div");Aa.style.cssText="position:absolute;left:202px;top:8px;bottom:"+ra+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
+1<this.defaultColorSchemes.length&&(q.appendChild(pa),q.appendChild(Aa));mxEvent.addListener(Aa,"click",mxUtils.bind(this,function(){va(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));F(pa);F(Aa);Da(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&q.appendChild(ea);return q};StyleFormatPanel.prototype.addEditOps=function(q){var F=this.editorUi.getSelectionState(),S=this.editorUi.editor.graph,ba=null;1==F.cells.length&&(ba=mxUtils.button(mxResources.get("editStyle"),
+mxUtils.bind(this,function(U){this.editorUi.actions.get("editStyle").funct()})),ba.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),ba.style.width="210px",ba.style.marginBottom="2px",q.appendChild(ba));S=1==F.cells.length?S.view.getState(F.cells[0]):null;null!=S&&null!=S.shape&&null!=S.shape.stencil?(F=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(U){this.editorUi.actions.get("editShape").funct()})),F.setAttribute("title",
+mxResources.get("editShape")),F.style.marginBottom="2px",null==ba?F.style.width="210px":(ba.style.width="104px",F.style.width="104px",F.style.marginLeft="2px"),q.appendChild(F)):F.image&&0<F.cells.length&&(F=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(U){this.editorUi.actions.get("image").funct()})),F.setAttribute("title",mxResources.get("editImage")),F.style.marginBottom="2px",null==ba?F.style.width="210px":(ba.style.width="104px",F.style.width="104px",F.style.marginLeft=
+"2px"),q.appendChild(F));return q}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(q){return q.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(q){return Graph.isGoogleFontUrl(q)};Graph.createFontElement=function(q,
+F){var S=Graph.fontMapping[F];null==S&&Graph.isCssFontUrl(F)?(q=document.createElement("link"),q.setAttribute("rel","stylesheet"),q.setAttribute("type","text/css"),q.setAttribute("charset","UTF-8"),q.setAttribute("href",F)):(null==S&&(S='@font-face {\nfont-family: "'+q+'";\nsrc: url("'+F+'");\n}'),q=document.createElement("style"),mxUtils.write(q,S));return q};Graph.addFont=function(q,F,S){if(null!=q&&0<q.length&&null!=F&&0<F.length){var ba=q.toLowerCase();if("helvetica"!=ba&&"arial"!=q&&"sans-serif"!=
+ba){var U=Graph.customFontElements[ba];null!=U&&U.url!=F&&(U.elt.parentNode.removeChild(U.elt),U=null);null==U?(U=F,"http:"==F.substring(0,5)&&(U=PROXY_URL+"?url="+encodeURIComponent(F)),U={name:q,url:F,elt:Graph.createFontElement(q,U)},Graph.customFontElements[ba]=U,Graph.recentCustomFonts[ba]=U,F=document.getElementsByTagName("head")[0],null!=S&&("link"==U.elt.nodeName.toLowerCase()?(U.elt.onload=S,U.elt.onerror=S):S()),null!=F&&F.appendChild(U.elt)):null!=S&&S()}else null!=S&&S()}else null!=S&&
+S();return q};Graph.getFontUrl=function(q,F){q=Graph.customFontElements[q.toLowerCase()];null!=q&&(F=q.url);return F};Graph.processFontAttributes=function(q){q=q.getElementsByTagName("*");for(var F=0;F<q.length;F++){var S=q[F].getAttribute("data-font-src");if(null!=S){var ba="FONT"==q[F].nodeName?q[F].getAttribute("face"):q[F].style.fontFamily;null!=ba&&Graph.addFont(ba,S)}}};Graph.processFontStyle=function(q){if(null!=q){var F=mxUtils.getValue(q,"fontSource",null);if(null!=F){var S=mxUtils.getValue(q,
+mxConstants.STYLE_FONTFAMILY,null);null!=S&&Graph.addFont(S,decodeURIComponent(F))}}return q};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";
+Graph.prototype.edgeMode="move"!=urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var z=Graph.prototype.init;Graph.prototype.init=function(){function q(U){F=U}z.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var F=null;mxEvent.addListener(this.container,"mouseenter",q);mxEvent.addListener(this.container,"mousemove",q);mxEvent.addListener(this.container,"mouseleave",function(U){F=null});this.isMouseInsertPoint=function(){return null!=
+F};var S=this.getInsertPoint;this.getInsertPoint=function(){return null!=F?this.getPointForEvent(F):S.apply(this,arguments)};var ba=this.layoutManager.getLayout;this.layoutManager.getLayout=function(U){var ca=this.graph.getCellStyle(U);if(null!=ca&&"rack"==ca.childLayout){var ea=new mxStackLayout(this.graph,!1);ea.gridSize=null!=ca.rackUnitSize?parseFloat(ca.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;ea.marginLeft=ca.marginLeft||0;ea.marginRight=ca.marginRight||
+0;ea.marginTop=ca.marginTop||0;ea.marginBottom=ca.marginBottom||0;ea.allowGaps=ca.allowGaps||0;ea.horizontal="1"==mxUtils.getValue(ca,"horizontalRack","0");ea.resizeParent=!1;ea.fill=!0;return ea}return ba.apply(this,arguments)};this.updateGlobalUrlVariables()};var t=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(q,F){return Graph.processFontStyle(t.apply(this,arguments))};var B=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(q,
+F,S,ba,U,ca,ea,na,ra,ya,va){B.apply(this,arguments);Graph.processFontAttributes(va)};var I=mxText.prototype.redraw;mxText.prototype.redraw=function(){I.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(q,F,S){function ba(){for(var xa=ea.getSelectionCells(),Ma=[],Oa=0;Oa<xa.length;Oa++)ea.isCellVisible(xa[Oa])&&Ma.push(xa[Oa]);ea.setSelectionCells(Ma)}function U(xa){ea.setHiddenTags(xa?[]:na.slice());
+ba();ea.refresh()}function ca(xa,Ma){ya.innerText="";if(0<xa.length){var Oa=document.createElement("table");Oa.setAttribute("cellpadding","2");Oa.style.boxSizing="border-box";Oa.style.tableLayout="fixed";Oa.style.width="100%";var Na=document.createElement("tbody");if(null!=xa&&0<xa.length)for(var La=0;La<xa.length;La++)(function(Ba){var ab=0>mxUtils.indexOf(ea.hiddenTags,Ba),Xa=document.createElement("tr"),x=document.createElement("td");x.style.align="center";x.style.width="16px";var H=document.createElement("img");
+H.setAttribute("src",ab?Editor.visibleImage:Editor.hiddenImage);H.setAttribute("title",mxResources.get(ab?"hideIt":"show",[Ba]));mxUtils.setOpacity(H,ab?75:25);H.style.verticalAlign="middle";H.style.cursor="pointer";H.style.width="16px";if(F||Editor.isDarkMode())H.style.filter="invert(100%)";x.appendChild(H);mxEvent.addListener(H,"click",function(X){mxEvent.isShiftDown(X)?U(0<=mxUtils.indexOf(ea.hiddenTags,Ba)):(ea.toggleHiddenTag(Ba),ba(),ea.refresh());mxEvent.consume(X)});Xa.appendChild(x);x=document.createElement("td");
+x.style.overflow="hidden";x.style.whiteSpace="nowrap";x.style.textOverflow="ellipsis";x.style.verticalAlign="middle";x.style.cursor="pointer";x.setAttribute("title",Ba);a=document.createElement("a");mxUtils.write(a,Ba);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,ab?100:40);x.appendChild(a);mxEvent.addListener(x,"click",function(X){if(mxEvent.isShiftDown(X)){U(!0);var Z=ea.getCellsForTags([Ba],null,null,!0);ea.isEnabled()?ea.setSelectionCells(Z):ea.highlightCells(Z)}else if(ab&&
+0<ea.hiddenTags.length)U(!0);else{Z=na.slice();var fa=mxUtils.indexOf(Z,Ba);Z.splice(fa,1);ea.setHiddenTags(Z);ba();ea.refresh()}mxEvent.consume(X)});Xa.appendChild(x);if(ea.isEnabled()){x=document.createElement("td");x.style.verticalAlign="middle";x.style.textAlign="center";x.style.width="18px";if(null==Ma){x.style.align="center";x.style.width="16px";H=document.createElement("img");H.setAttribute("src",Editor.crossImage);H.setAttribute("title",mxResources.get("removeIt",[Ba]));mxUtils.setOpacity(H,
+ab?75:25);H.style.verticalAlign="middle";H.style.cursor="pointer";H.style.width="16px";if(F||Editor.isDarkMode())H.style.filter="invert(100%)";mxEvent.addListener(H,"click",function(X){var Z=mxUtils.indexOf(na,Ba);0<=Z&&na.splice(Z,1);ea.removeTagsForCells(ea.model.getDescendants(ea.model.getRoot()),[Ba]);ea.refresh();mxEvent.consume(X)});x.appendChild(H)}else{var P=document.createElement("input");P.setAttribute("type","checkbox");P.style.margin="0px";P.defaultChecked=null!=Ma&&0<=mxUtils.indexOf(Ma,
+Ba);P.checked=P.defaultChecked;P.style.background="transparent";P.setAttribute("title",mxResources.get(P.defaultChecked?"removeIt":"add",[Ba]));mxEvent.addListener(P,"change",function(X){P.checked?ea.addTagsForCells(ea.getSelectionCells(),[Ba]):ea.removeTagsForCells(ea.getSelectionCells(),[Ba]);mxEvent.consume(X)});x.appendChild(P)}Xa.appendChild(x)}Na.appendChild(Xa)})(xa[La]);Oa.appendChild(Na);ya.appendChild(Oa)}}var ea=this,na=ea.hiddenTags.slice(),ra=document.createElement("div");ra.style.userSelect=
+"none";ra.style.overflow="hidden";ra.style.padding="10px";ra.style.height="100%";var ya=document.createElement("div");ya.style.boxSizing="border-box";ya.style.borderRadius="4px";ya.style.userSelect="none";ya.style.overflow="auto";ya.style.position="absolute";ya.style.left="10px";ya.style.right="10px";ya.style.top="10px";ya.style.border=ea.isEnabled()?"1px solid #808080":"none";ya.style.bottom=ea.isEnabled()?"48px":"10px";ra.appendChild(ya);var va=mxUtils.button(mxResources.get("reset"),function(xa){ea.setHiddenTags([]);
+mxEvent.isShiftDown(xa)||(na=ea.hiddenTags.slice());ba();ea.refresh()});va.setAttribute("title",mxResources.get("reset"));va.className="geBtn";va.style.margin="0 4px 0 0";var Da=mxUtils.button(mxResources.get("add"),function(){null!=S&&S(na,function(xa){na=xa;pa()})});Da.setAttribute("title",mxResources.get("add"));Da.className="geBtn";Da.style.margin="0";ea.addListener(mxEvent.ROOT,function(){na=ea.hiddenTags.slice()});var pa=mxUtils.bind(this,function(xa,Ma){if(q()){xa=ea.getAllTags();for(Ma=0;Ma<
+xa.length;Ma++)0>mxUtils.indexOf(na,xa[Ma])&&na.push(xa[Ma]);na.sort();ea.isSelectionEmpty()?ca(na):ca(na,ea.getCommonTagsForCells(ea.getSelectionCells()))}});ea.selectionModel.addListener(mxEvent.CHANGE,pa);ea.model.addListener(mxEvent.CHANGE,pa);ea.addListener(mxEvent.REFRESH,pa);var Aa=document.createElement("div");Aa.style.boxSizing="border-box";Aa.style.whiteSpace="nowrap";Aa.style.position="absolute";Aa.style.overflow="hidden";Aa.style.bottom="0px";Aa.style.height="42px";Aa.style.right="10px";
+Aa.style.left="10px";ea.isEnabled()&&(Aa.appendChild(va),Aa.appendChild(Da),ra.appendChild(Aa));return{div:ra,refresh:pa}};Graph.prototype.getCustomFonts=function(){var q=this.extFonts;q=null!=q?q.slice():[];for(var F in Graph.customFontElements){var S=Graph.customFontElements[F];q.push({name:S.name,url:S.url})}return q};Graph.prototype.setFont=function(q,F){Graph.addFont(q,F);document.execCommand("fontname",!1,q);if(null!=F){var S=this.cellEditor.textarea.getElementsByTagName("font");F=Graph.getFontUrl(q,
+F);for(var ba=0;ba<S.length;ba++)S[ba].getAttribute("face")==q&&S[ba].getAttribute("data-font-src")!=F&&S[ba].setAttribute("data-font-src",F)}};var O=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return O.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var q=JSON.parse(decodeURIComponent(urlParams.vars));
+if(null!=q)for(var F in q)this.globalVars[F]=q[F]}catch(S){null!=window.console&&console.log("Error in vars URL parameter: "+S)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var J=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(q){var F=J.apply(this,arguments);null==F&&null!=this.globalVars&&(F=this.globalVars[q]);return F};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var q=
+this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(q.ownerDocument)).decode(q)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var y=Graph.prototype.getSvg;Graph.prototype.getSvg=function(q,F,S,ba,U,ca,ea,na,ra,ya,va,Da,pa,Aa){var xa=null,Ma=null,Oa=null;Da||null==this.themes||"darkTheme"!=this.defaultThemeName||(xa=this.stylesheet,Ma=this.shapeForegroundColor,Oa=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?
+"#000000":Editor.lightColor,this.shapeBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var Na=y.apply(this,arguments),La=this.getCustomFonts();if(va&&0<La.length){var Ba=Na.ownerDocument,ab=null!=Ba.createElementNS?Ba.createElementNS(mxConstants.NS_SVG,"style"):Ba.createElement("style");null!=Ba.setAttributeNS?ab.setAttributeNS("type","text/css"):ab.setAttribute("type","text/css");for(var Xa="",x="",H=0;H<La.length;H++){var P=
+La[H].name,X=La[H].url;Graph.isCssFontUrl(X)?Xa+="@import url("+X+");\n":x+='@font-face {\nfont-family: "'+P+'";\nsrc: url("'+X+'");\n}\n'}ab.appendChild(Ba.createTextNode(Xa+x));Na.getElementsByTagName("defs")[0].appendChild(ab)}this.mathEnabled&&(document.body.appendChild(Na),Editor.MathJaxRender(Na),Na.parentNode.removeChild(Na));null!=xa&&(this.shapeBackgroundColor=Oa,this.shapeForegroundColor=Ma,this.stylesheet=xa,this.refresh());return Na};var ia=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=
+function(q){ia.apply(this,arguments);null!=q.secondLabel&&(q.secondLabel.destroy(),q.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(q){return[q.shape,q.text,q.secondLabel,q.control]};var da=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){da.apply(this,arguments);this.enumerationState=0};var ja=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(q){null!=q.shape&&this.redrawEnumerationState(q);return ja.apply(this,
+arguments)};mxGraphView.prototype.createEnumerationValue=function(q){q=decodeURIComponent(mxUtils.getValue(q.style,"enumerateValue",""));""==q&&(q=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(q)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(q){var F="1"==mxUtils.getValue(q.style,"enumerate",0);F&&null==q.secondLabel?(q.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),
+q.secondLabel.size=12,q.secondLabel.state=q,q.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(q,q.secondLabel)):F||null==q.secondLabel||(q.secondLabel.destroy(),q.secondLabel=null);F=q.secondLabel;if(null!=F){var S=q.view.scale,ba=this.createEnumerationValue(q);q=this.graph.model.isVertex(q.cell)?new mxRectangle(q.x+q.width-4*S,q.y+4*S,0,0):mxRectangle.fromPoint(q.view.getPoint(q));F.bounds.equals(q)&&F.value==ba&&F.scale==S||(F.bounds=q,F.value=ba,F.scale=
+S,F.redraw())}};var aa=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){aa.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var q=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||
+this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",q.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,q.ownerSVGElement))}};var qa=Graph.prototype.refresh;Graph.prototype.refresh=function(){qa.apply(this,
+arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var sa=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){sa.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(q){"data:action/json,"==q.substring(0,17)&&(q=JSON.parse(q.substring(17)),
+null!=q.actions&&this.executeCustomActions(q.actions))};Graph.prototype.executeCustomActions=function(q,F){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var S=!1,ba=0,U=0,ca=mxUtils.bind(this,function(){S||(S=!0,this.model.beginUpdate())}),ea=
+mxUtils.bind(this,function(){S&&(S=!1,this.model.endUpdate())}),na=mxUtils.bind(this,function(){0<ba&&ba--;0==ba&&ra()}),ra=mxUtils.bind(this,function(){if(U<q.length){var ya=this.stoppingCustomActions,va=q[U++],Da=[];if(null!=va.open)if(ea(),this.isCustomLink(va.open)){if(!this.customLinkClicked(va.open))return}else this.openLink(va.open);null==va.wait||ya||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;na()}),ba++,this.pendingWaitThread=
+window.setTimeout(this.pendingExecuteNextAction,""!=va.wait?parseInt(va.wait):1E3),ea());null!=va.opacity&&null!=va.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(va.opacity,!0)),va.opacity.value);null!=va.fadeIn&&(ba++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(va.fadeIn,!0)),0,1,na,ya?0:va.fadeIn.delay));null!=va.fadeOut&&(ba++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(va.fadeOut,!0)),1,0,na,ya?0:va.fadeOut.delay));null!=
+va.wipeIn&&(Da=Da.concat(this.createWipeAnimations(this.getCellsForAction(va.wipeIn,!0),!0)));null!=va.wipeOut&&(Da=Da.concat(this.createWipeAnimations(this.getCellsForAction(va.wipeOut,!0),!1)));null!=va.toggle&&(ca(),this.toggleCells(this.getCellsForAction(va.toggle,!0)));if(null!=va.show){ca();var pa=this.getCellsForAction(va.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(pa),1);this.setCellsVisible(pa,!0)}null!=va.hide&&(ca(),pa=this.getCellsForAction(va.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(pa),
+0),this.setCellsVisible(pa,!1));null!=va.toggleStyle&&null!=va.toggleStyle.key&&(ca(),this.toggleCellStyles(va.toggleStyle.key,null!=va.toggleStyle.defaultValue?va.toggleStyle.defaultValue:"0",this.getCellsForAction(va.toggleStyle,!0)));null!=va.style&&null!=va.style.key&&(ca(),this.setCellStyles(va.style.key,va.style.value,this.getCellsForAction(va.style,!0)));pa=[];null!=va.select&&this.isEnabled()&&(pa=this.getCellsForAction(va.select),this.setSelectionCells(pa));null!=va.highlight&&(pa=this.getCellsForAction(va.highlight),
+this.highlightCells(pa,va.highlight.color,va.highlight.duration,va.highlight.opacity));null!=va.scroll&&(pa=this.getCellsForAction(va.scroll));null!=va.viewbox&&this.fitWindow(va.viewbox,va.viewbox.border);0<pa.length&&this.scrollCellToVisible(pa[0]);if(null!=va.tags){pa=[];null!=va.tags.hidden&&(pa=pa.concat(va.tags.hidden));if(null!=va.tags.visible)for(var Aa=this.getAllTags(),xa=0;xa<Aa.length;xa++)0>mxUtils.indexOf(va.tags.visible,Aa[xa])&&0>mxUtils.indexOf(pa,Aa[xa])&&pa.push(Aa[xa]);this.setHiddenTags(pa);
+this.refresh()}0<Da.length&&(ba++,this.executeAnimations(Da,na,ya?1:va.steps,ya?0:va.delay));0==ba?ra():ea()}else this.stoppingCustomActions=this.executingCustomActions=!1,ea(),null!=F&&F()});ra()}};Graph.prototype.doUpdateCustomLinksForCell=function(q,F){var S=this.getLinkForCell(F);null!=S&&"data:action/json,"==S.substring(0,17)&&this.setLinkForCell(F,this.updateCustomLink(q,S));if(this.isHtmlLabel(F)){var ba=document.createElement("div");ba.innerHTML=this.sanitizeHtml(this.getLabel(F));for(var U=
+ba.getElementsByTagName("a"),ca=!1,ea=0;ea<U.length;ea++)S=U[ea].getAttribute("href"),null!=S&&"data:action/json,"==S.substring(0,17)&&(U[ea].setAttribute("href",this.updateCustomLink(q,S)),ca=!0);ca&&this.labelChanged(F,ba.innerHTML)}};Graph.prototype.updateCustomLink=function(q,F){if("data:action/json,"==F.substring(0,17))try{var S=JSON.parse(F.substring(17));null!=S.actions&&(this.updateCustomLinkActions(q,S.actions),F="data:action/json,"+JSON.stringify(S))}catch(ba){}return F};Graph.prototype.updateCustomLinkActions=
+function(q,F){for(var S=0;S<F.length;S++){var ba=F[S],U;for(U in ba)this.updateCustomLinkAction(q,ba[U],"cells"),this.updateCustomLinkAction(q,ba[U],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(q,F,S){if(null!=F&&null!=F[S]){for(var ba=[],U=0;U<F[S].length;U++)if("*"==F[S][U])ba.push(F[S][U]);else{var ca=q[F[S][U]];null!=ca?""!=ca&&ba.push(ca):ba.push(F[S][U])}F[S]=ba}};Graph.prototype.getCellsForAction=function(q,F){F=this.getCellsById(q.cells).concat(this.getCellsForTags(q.tags,
+null,F));if(null!=q.excludeCells){for(var S=[],ba=0;ba<F.length;ba++)0>q.excludeCells.indexOf(F[ba].id)&&S.push(F[ba]);F=S}return F};Graph.prototype.getCellsById=function(q){var F=[];if(null!=q)for(var S=0;S<q.length;S++)if("*"==q[S]){var ba=this.model.getRoot();F=F.concat(this.model.filterDescendants(function(ca){return ca!=ba},ba))}else{var U=this.model.getCell(q[S]);null!=U&&F.push(U)}return F};var L=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(q){return L.apply(this,arguments)&&
+!this.isAllTagsHidden(this.getTagsForCell(q))};Graph.prototype.setHiddenTags=function(q){this.hiddenTags=q;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(q){var F=mxUtils.indexOf(this.hiddenTags,q);0>F?this.hiddenTags.push(q):0<=F&&this.hiddenTags.splice(F,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(q){if(null==q||0==q.length||0==this.hiddenTags.length)return!1;q=q.split(" ");if(q.length>this.hiddenTags.length)return!1;
+for(var F=0;F<q.length;F++)if(0>mxUtils.indexOf(this.hiddenTags,q[F]))return!1;return!0};Graph.prototype.getCellsForTags=function(q,F,S,ba){var U=[];if(null!=q){F=null!=F?F:this.model.getDescendants(this.model.getRoot());for(var ca=0,ea={},na=0;na<q.length;na++)0<q[na].length&&(ea[q[na]]=!0,ca++);for(na=0;na<F.length;na++)if(S&&this.model.getParent(F[na])==this.model.root||this.model.isVertex(F[na])||this.model.isEdge(F[na])){var ra=this.getTagsForCell(F[na]),ya=!1;if(0<ra.length&&(ra=ra.split(" "),
+ra.length>=q.length)){for(var va=ya=0;va<ra.length&&ya<ca;va++)null!=ea[ra[va]]&&ya++;ya=ya==ca}ya&&(1!=ba||this.isCellVisible(F[na]))&&U.push(F[na])}}return U};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(q){for(var F=null,S=[],ba=0;ba<q.length;ba++){var U=this.getTagsForCell(q[ba]);S=[];if(0<U.length){U=U.split(" ");for(var ca={},ea=0;ea<U.length;ea++)if(null==F||null!=F[U[ea]])ca[U[ea]]=
+!0,S.push(U[ea]);F=ca}else return[]}return S};Graph.prototype.getTagsForCells=function(q){for(var F=[],S={},ba=0;ba<q.length;ba++){var U=this.getTagsForCell(q[ba]);if(0<U.length){U=U.split(" ");for(var ca=0;ca<U.length;ca++)null==S[U[ca]]&&(S[U[ca]]=!0,F.push(U[ca]))}}return F};Graph.prototype.getTagsForCell=function(q){return this.getAttributeForCell(q,"tags","")};Graph.prototype.addTagsForCells=function(q,F){if(0<q.length&&0<F.length){this.model.beginUpdate();try{for(var S=0;S<q.length;S++){for(var ba=
+this.getTagsForCell(q[S]),U=ba.split(" "),ca=!1,ea=0;ea<F.length;ea++){var na=mxUtils.trim(F[ea]);""!=na&&0>mxUtils.indexOf(U,na)&&(ba=0<ba.length?ba+" "+na:na,ca=!0)}ca&&this.setAttributeForCell(q[S],"tags",ba)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(q,F){if(0<q.length&&0<F.length){this.model.beginUpdate();try{for(var S=0;S<q.length;S++){var ba=this.getTagsForCell(q[S]);if(0<ba.length){for(var U=ba.split(" "),ca=!1,ea=0;ea<F.length;ea++){var na=mxUtils.indexOf(U,
+F[ea]);0<=na&&(U.splice(na,1),ca=!0)}ca&&this.setAttributeForCell(q[S],"tags",U.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(q){this.model.beginUpdate();try{for(var F=0;F<q.length;F++)this.model.setVisible(q[F],!this.model.isVisible(q[F]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(q,F){this.model.beginUpdate();try{for(var S=0;S<q.length;S++)this.model.setVisible(q[S],F)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=
+function(q,F,S,ba){for(var U=0;U<q.length;U++)this.highlightCell(q[U],F,S,ba)};Graph.prototype.highlightCell=function(q,F,S,ba,U){F=null!=F?F:mxConstants.DEFAULT_VALID_COLOR;S=null!=S?S:1E3;q=this.view.getState(q);var ca=null;null!=q&&(U=null!=U?U:4,U=Math.max(U+1,mxUtils.getValue(q.style,mxConstants.STYLE_STROKEWIDTH,1)+U),ca=new mxCellHighlight(this,F,U,!1),null!=ba&&(ca.opacity=ba),ca.highlight(q),window.setTimeout(function(){null!=ca.shape&&(mxUtils.setPrefixedStyle(ca.shape.node.style,"transition",
+"all 1200ms ease-in-out"),ca.shape.node.style.opacity=0);window.setTimeout(function(){ca.destroy()},1200)},S));return ca};Graph.prototype.addSvgShadow=function(q,F,S,ba){S=null!=S?S:!1;ba=null!=ba?ba:!0;var U=q.ownerDocument,ca=null!=U.createElementNS?U.createElementNS(mxConstants.NS_SVG,"filter"):U.createElement("filter");ca.setAttribute("id",this.shadowId);var ea=null!=U.createElementNS?U.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):U.createElement("feGaussianBlur");ea.setAttribute("in",
+"SourceAlpha");ea.setAttribute("stdDeviation",this.svgShadowBlur);ea.setAttribute("result","blur");ca.appendChild(ea);ea=null!=U.createElementNS?U.createElementNS(mxConstants.NS_SVG,"feOffset"):U.createElement("feOffset");ea.setAttribute("in","blur");ea.setAttribute("dx",this.svgShadowSize);ea.setAttribute("dy",this.svgShadowSize);ea.setAttribute("result","offsetBlur");ca.appendChild(ea);ea=null!=U.createElementNS?U.createElementNS(mxConstants.NS_SVG,"feFlood"):U.createElement("feFlood");ea.setAttribute("flood-color",
+this.svgShadowColor);ea.setAttribute("flood-opacity",this.svgShadowOpacity);ea.setAttribute("result","offsetColor");ca.appendChild(ea);ea=null!=U.createElementNS?U.createElementNS(mxConstants.NS_SVG,"feComposite"):U.createElement("feComposite");ea.setAttribute("in","offsetColor");ea.setAttribute("in2","offsetBlur");ea.setAttribute("operator","in");ea.setAttribute("result","offsetBlur");ca.appendChild(ea);ea=null!=U.createElementNS?U.createElementNS(mxConstants.NS_SVG,"feBlend"):U.createElement("feBlend");
+ea.setAttribute("in","SourceGraphic");ea.setAttribute("in2","offsetBlur");ca.appendChild(ea);ea=q.getElementsByTagName("defs");0==ea.length?(U=null!=U.createElementNS?U.createElementNS(mxConstants.NS_SVG,"defs"):U.createElement("defs"),null!=q.firstChild?q.insertBefore(U,q.firstChild):q.appendChild(U)):U=ea[0];U.appendChild(ca);S||(F=null!=F?F:q.getElementsByTagName("g")[0],null!=F&&(F.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(q.getAttribute("width")))&&ba&&(q.setAttribute("width",
+parseInt(q.getAttribute("width"))+6),q.setAttribute("height",parseInt(q.getAttribute("height"))+6),F=q.getAttribute("viewBox"),null!=F&&0<F.length&&(F=F.split(" "),3<F.length&&(w=parseFloat(F[2])+6,h=parseFloat(F[3])+6,q.setAttribute("viewBox",F[0]+" "+F[1]+" "+w+" "+h))))));return ca};Graph.prototype.setShadowVisible=function(q,F){mxClient.IS_SVG&&!mxClient.IS_SF&&(F=null!=F?F:!0,(this.shadowVisible=q)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),
+F&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var q=this.model.getChildCount(this.model.root),F=0;do var S=this.model.getChildAt(this.model.root,F);while(F++<q&&"1"==mxUtils.getValue(this.getCellStyle(S),"locked","0"));null!=S&&this.setDefaultParent(S)}};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=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=
+[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.kubernetes=[SHAPES_PATH+"/mxKubernetes.js",STENCIL_PATH+"/kubernetes.xml"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=
+[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=[SHAPES_PATH+"/ios7/mxIOS7Ui.js",STENCIL_PATH+"/ios7/misc.xml"];mxStencilRegistry.libraries.android=[SHAPES_PATH+"/mxAndroid.js",STENCIL_PATH+"/android/android.xml"];mxStencilRegistry.libraries["electrical/abstract"]=[SHAPES_PATH+"/mxElectrical.js",
+STENCIL_PATH+"/electrical/abstract.xml"];mxStencilRegistry.libraries["electrical/logic_gates"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries["electrical/miscellaneous"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/miscellaneous.xml"];mxStencilRegistry.libraries["electrical/signal_sources"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/signal_sources.xml"];mxStencilRegistry.libraries["electrical/electro-mechanical"]=
+[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/electro-mechanical.xml"];mxStencilRegistry.libraries["electrical/transmission"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/transmission.xml"];mxStencilRegistry.libraries.infographic=[SHAPES_PATH+"/mxInfographic.js"];mxStencilRegistry.libraries["mockup/buttons"]=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries["mockup/containers"]=[SHAPES_PATH+"/mockup/mxMockupContainers.js"];mxStencilRegistry.libraries["mockup/forms"]=
+[SHAPES_PATH+"/mockup/mxMockupForms.js"];mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=
+[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.ibm=[SHAPES_PATH+"/mxIBM.js",STENCIL_PATH+
+"/ibm.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=
+[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",
+STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(q){var F=null;null!=q&&0<q.length&&("ER"==q.substring(0,2)?F="mxgraph.er":"sysML"==q.substring(0,
+5)&&(F="mxgraph.sysml"));return F};var V=mxMarker.createMarker;mxMarker.createMarker=function(q,F,S,ba,U,ca,ea,na,ra,ya){if(null!=S&&null==mxMarker.markers[S]){var va=this.getPackageForType(S);null!=va&&mxStencilRegistry.getStencil(va)}return V.apply(this,arguments)};var T=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(q,F,S,ba,U,ca){"1"==mxUtils.getValue(F.style,"lineShape",null)&&q.setFillColor(mxUtils.getValue(F.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return T.apply(this,
+arguments)};PrintDialog.prototype.create=function(q,F){function S(){pa.value=Math.max(1,Math.min(na,Math.max(parseInt(pa.value),parseInt(Da.value))));Da.value=Math.max(1,Math.min(na,Math.min(parseInt(pa.value),parseInt(Da.value))))}function ba(oa){function ta(Ya,Za,fb){var hb=Ya.useCssTransforms,qb=Ya.currentTranslate,kb=Ya.currentScale,ib=Ya.view.translate,ub=Ya.view.scale;Ya.useCssTransforms&&(Ya.useCssTransforms=!1,Ya.currentTranslate=new mxPoint(0,0),Ya.currentScale=1,Ya.view.translate=new mxPoint(0,
+0),Ya.view.scale=1);var ob=Ya.getGraphBounds(),nb=0,wb=0,lb=za.get(),gb=1/Ya.pageScale,tb=Na.checked;if(tb){gb=parseInt(fa.value);var Cb=parseInt(la.value);gb=Math.min(lb.height*Cb/(ob.height/Ya.view.scale),lb.width*gb/(ob.width/Ya.view.scale))}else gb=parseInt(Oa.value)/(100*Ya.pageScale),isNaN(gb)&&(Ea=1/Ya.pageScale,Oa.value="100 %");lb=mxRectangle.fromRectangle(lb);lb.width=Math.ceil(lb.width*Ea);lb.height=Math.ceil(lb.height*Ea);gb*=Ea;!tb&&Ya.pageVisible?(ob=Ya.getPageLayout(),nb-=ob.x*lb.width,
+wb-=ob.y*lb.height):tb=!0;if(null==Za){Za=PrintDialog.createPrintPreview(Ya,gb,lb,0,nb,wb,tb);Za.pageSelector=!1;Za.mathEnabled=!1;Aa.checked&&(Za.isCellVisible=function(pb){return Ya.isCellSelected(pb)});nb=q.getCurrentFile();null!=nb&&(Za.title=nb.getTitle());var xb=Za.writeHead;Za.writeHead=function(pb){xb.apply(this,arguments);mxClient.IS_GC&&(pb.writeln('<style type="text/css">'),pb.writeln("@media print {"),pb.writeln(".MathJax svg { shape-rendering: crispEdges; }"),pb.writeln("}"),pb.writeln("</style>"));
+null!=q.editor.fontCss&&(pb.writeln('<style type="text/css">'),pb.writeln(q.editor.fontCss),pb.writeln("</style>"));for(var yb=Ya.getCustomFonts(),Ab=0;Ab<yb.length;Ab++){var c=yb[Ab].name,m=yb[Ab].url;Graph.isCssFontUrl(m)?pb.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(m)+'" charset="UTF-8" type="text/css">'):(pb.writeln('<style type="text/css">'),pb.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(c)+'";\nsrc: url("'+mxUtils.htmlEntities(m)+'");\n}'),pb.writeln("</style>"))}};
+if("undefined"!==typeof MathJax){var zb=Za.renderPage;Za.renderPage=function(pb,yb,Ab,c,m,v){var n=mxClient.NO_FO,u=zb.apply(this,arguments);mxClient.NO_FO=n;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:u.className="geDisableMathJax";return u}}nb=null;wb=U.shapeForegroundColor;tb=U.shapeBackgroundColor;lb=U.enableFlowAnimation;U.enableFlowAnimation=!1;null!=U.themes&&"darkTheme"==U.defaultThemeName&&(nb=U.stylesheet,U.stylesheet=U.getDefaultStylesheet(),U.shapeForegroundColor="#000000",
+U.shapeBackgroundColor="#ffffff",U.refresh());Za.open(null,null,fb,!0);U.enableFlowAnimation=lb;null!=nb&&(U.shapeForegroundColor=wb,U.shapeBackgroundColor=tb,U.stylesheet=nb,U.refresh())}else{lb=Ya.background;if(null==lb||""==lb||lb==mxConstants.NONE)lb="#ffffff";Za.backgroundColor=lb;Za.autoOrigin=tb;Za.appendGraph(Ya,gb,nb,wb,fb,!0);fb=Ya.getCustomFonts();if(null!=Za.wnd)for(nb=0;nb<fb.length;nb++)wb=fb[nb].name,tb=fb[nb].url,Graph.isCssFontUrl(tb)?Za.wnd.document.writeln('<link rel="stylesheet" href="'+
+mxUtils.htmlEntities(tb)+'" charset="UTF-8" type="text/css">'):(Za.wnd.document.writeln('<style type="text/css">'),Za.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(wb)+'";\nsrc: url("'+mxUtils.htmlEntities(tb)+'");\n}'),Za.wnd.document.writeln("</style>"))}hb&&(Ya.useCssTransforms=hb,Ya.currentTranslate=qb,Ya.currentScale=kb,Ya.view.translate=ib,Ya.view.scale=ub);return Za}var Ea=parseInt(ua.value)/100;isNaN(Ea)&&(Ea=1,ua.value="100 %");Ea*=.75;var Fa=null,Pa=U.shapeForegroundColor,
+Ra=U.shapeBackgroundColor;null!=U.themes&&"darkTheme"==U.defaultThemeName&&(Fa=U.stylesheet,U.stylesheet=U.getDefaultStylesheet(),U.shapeForegroundColor="#000000",U.shapeBackgroundColor="#ffffff",U.refresh());var Ca=Da.value,Ja=pa.value,Qa=!ya.checked,$a=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(q,ya.checked,Ca,Ja,Na.checked,fa.value,la.value,parseInt(Oa.value)/100,parseInt(ua.value)/100,za.get());else{Qa&&(Qa=Aa.checked||Ca==ra&&Ja==ra);if(!Qa&&null!=q.pages&&q.pages.length){var eb=
+0;Qa=q.pages.length-1;ya.checked||(eb=parseInt(Ca)-1,Qa=parseInt(Ja)-1);for(var cb=eb;cb<=Qa;cb++){var db=q.pages[cb];Ca=db==q.currentPage?U:null;if(null==Ca){Ca=q.createTemporaryGraph(U.stylesheet);Ca.shapeForegroundColor=U.shapeForegroundColor;Ca.shapeBackgroundColor=U.shapeBackgroundColor;Ja=!0;eb=!1;var rb=null,mb=null;null==db.viewState&&null==db.root&&q.updatePageRoot(db);null!=db.viewState&&(Ja=db.viewState.pageVisible,eb=db.viewState.mathEnabled,rb=db.viewState.background,mb=db.viewState.backgroundImage,
+Ca.extFonts=db.viewState.extFonts);null!=mb&&null!=mb.originalSrc&&(mb=q.createImageForPageLink(mb.originalSrc,db));Ca.background=rb;Ca.backgroundImage=null!=mb?new mxImage(mb.src,mb.width,mb.height,mb.x,mb.y):null;Ca.pageVisible=Ja;Ca.mathEnabled=eb;var vb=Ca.getGraphBounds;Ca.getGraphBounds=function(){var Ya=vb.apply(this,arguments),Za=this.backgroundImage;if(null!=Za&&null!=Za.width&&null!=Za.height){var fb=this.view.translate,hb=this.view.scale;Ya=mxRectangle.fromRectangle(Ya);Ya.add(new mxRectangle((fb.x+
+Za.x)*hb,(fb.y+Za.y)*hb,Za.width*hb,Za.height*hb))}return Ya};var Bb=Ca.getGlobalVariable;Ca.getGlobalVariable=function(Ya){return"page"==Ya?db.getName():"pagenumber"==Ya?cb+1:"pagecount"==Ya?null!=q.pages?q.pages.length:1:Bb.apply(this,arguments)};document.body.appendChild(Ca.container);q.updatePageRoot(db);Ca.model.setRoot(db.root)}$a=ta(Ca,$a,cb!=Qa);Ca!=U&&Ca.container.parentNode.removeChild(Ca.container)}}else $a=ta(U);null==$a?q.handleError({message:mxResources.get("errorUpdatingPreview")}):
+($a.mathEnabled&&(Qa=$a.wnd.document,oa&&($a.wnd.IMMEDIATE_PRINT=!0),Qa.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),$a.closeDocument(),!$a.mathEnabled&&oa&&PrintDialog.printPreview($a));null!=Fa&&(U.shapeForegroundColor=Pa,U.shapeBackgroundColor=Ra,U.stylesheet=Fa,U.refresh())}}var U=q.editor.graph,ca=document.createElement("div"),ea=document.createElement("h3");ea.style.width="100%";ea.style.textAlign="center";ea.style.marginTop="0px";mxUtils.write(ea,
+F||mxResources.get("print"));ca.appendChild(ea);var na=1,ra=1;ea=document.createElement("div");ea.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var ya=document.createElement("input");ya.style.cssText="margin-right:8px;margin-bottom:8px;";ya.setAttribute("value","all");ya.setAttribute("type","radio");ya.setAttribute("name","pages-printdialog");ea.appendChild(ya);F=document.createElement("span");mxUtils.write(F,mxResources.get("printAllPages"));ea.appendChild(F);
+mxUtils.br(ea);var va=ya.cloneNode(!0);ya.setAttribute("checked","checked");va.setAttribute("value","range");ea.appendChild(va);F=document.createElement("span");mxUtils.write(F,mxResources.get("pages")+":");ea.appendChild(F);var Da=document.createElement("input");Da.style.cssText="margin:0 8px 0 8px;";Da.setAttribute("value","1");Da.setAttribute("type","number");Da.setAttribute("min","1");Da.style.width="50px";ea.appendChild(Da);F=document.createElement("span");mxUtils.write(F,mxResources.get("to"));
+ea.appendChild(F);var pa=Da.cloneNode(!0);ea.appendChild(pa);mxEvent.addListener(Da,"focus",function(){va.checked=!0});mxEvent.addListener(pa,"focus",function(){va.checked=!0});mxEvent.addListener(Da,"change",S);mxEvent.addListener(pa,"change",S);if(null!=q.pages&&(na=q.pages.length,null!=q.currentPage))for(F=0;F<q.pages.length;F++)if(q.currentPage==q.pages[F]){ra=F+1;Da.value=ra;pa.value=ra;break}Da.setAttribute("max",na);pa.setAttribute("max",na);q.isPagesEnabled()?1<na&&(ca.appendChild(ea),va.checked=
+!0):va.checked=!0;mxUtils.br(ea);var Aa=document.createElement("input");Aa.setAttribute("value","all");Aa.setAttribute("type","radio");Aa.style.marginRight="8px";U.isSelectionEmpty()&&Aa.setAttribute("disabled","disabled");var xa=document.createElement("div");xa.style.marginBottom="10px";1==na?(Aa.setAttribute("type","checkbox"),Aa.style.marginBottom="12px",xa.appendChild(Aa)):(Aa.setAttribute("name","pages-printdialog"),Aa.style.marginBottom="8px",ea.appendChild(Aa));F=document.createElement("span");
+mxUtils.write(F,mxResources.get("selectionOnly"));Aa.parentNode.appendChild(F);1==na&&mxUtils.br(Aa.parentNode);var Ma=document.createElement("input");Ma.style.marginRight="8px";Ma.setAttribute("value","adjust");Ma.setAttribute("type","radio");Ma.setAttribute("name","printZoom");xa.appendChild(Ma);F=document.createElement("span");mxUtils.write(F,mxResources.get("adjustTo"));xa.appendChild(F);var Oa=document.createElement("input");Oa.style.cssText="margin:0 8px 0 8px;";Oa.setAttribute("value","100 %");
+Oa.style.width="50px";xa.appendChild(Oa);mxEvent.addListener(Oa,"focus",function(){Ma.checked=!0});ca.appendChild(xa);ea=ea.cloneNode(!1);var Na=Ma.cloneNode(!0);Na.setAttribute("value","fit");Ma.setAttribute("checked","checked");F=document.createElement("div");F.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";F.appendChild(Na);ea.appendChild(F);xa=document.createElement("table");xa.style.display="inline-block";var La=document.createElement("tbody"),Ba=document.createElement("tr"),
+ab=Ba.cloneNode(!0),Xa=document.createElement("td"),x=Xa.cloneNode(!0),H=Xa.cloneNode(!0),P=Xa.cloneNode(!0),X=Xa.cloneNode(!0),Z=Xa.cloneNode(!0);Xa.style.textAlign="right";P.style.textAlign="right";mxUtils.write(Xa,mxResources.get("fitTo"));var fa=document.createElement("input");fa.style.cssText="margin:0 8px 0 8px;";fa.setAttribute("value","1");fa.setAttribute("min","1");fa.setAttribute("type","number");fa.style.width="40px";x.appendChild(fa);F=document.createElement("span");mxUtils.write(F,mxResources.get("fitToSheetsAcross"));
+H.appendChild(F);mxUtils.write(P,mxResources.get("fitToBy"));var la=fa.cloneNode(!0);X.appendChild(la);mxEvent.addListener(fa,"focus",function(){Na.checked=!0});mxEvent.addListener(la,"focus",function(){Na.checked=!0});F=document.createElement("span");mxUtils.write(F,mxResources.get("fitToSheetsDown"));Z.appendChild(F);Ba.appendChild(Xa);Ba.appendChild(x);Ba.appendChild(H);ab.appendChild(P);ab.appendChild(X);ab.appendChild(Z);La.appendChild(Ba);La.appendChild(ab);xa.appendChild(La);ea.appendChild(xa);
+ca.appendChild(ea);ea=document.createElement("div");F=document.createElement("div");F.style.fontWeight="bold";F.style.marginBottom="12px";mxUtils.write(F,mxResources.get("paperSize"));ea.appendChild(F);F=document.createElement("div");F.style.marginBottom="12px";var za=PageSetupDialog.addPageFormatPanel(F,"printdialog",q.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);ea.appendChild(F);F=document.createElement("span");mxUtils.write(F,mxResources.get("pageScale"));ea.appendChild(F);var ua=
+document.createElement("input");ua.style.cssText="margin:0 8px 0 8px;";ua.setAttribute("value","100 %");ua.style.width="60px";ea.appendChild(ua);ca.appendChild(ea);F=document.createElement("div");F.style.cssText="text-align:right;margin:48px 0 0 0;";ea=mxUtils.button(mxResources.get("cancel"),function(){q.hideDialog()});ea.className="geBtn";q.editor.cancelFirst&&F.appendChild(ea);q.isOffline()||(xa=mxUtils.button(mxResources.get("help"),function(){U.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),
+xa.className="geBtn",F.appendChild(xa));PrintDialog.previewEnabled&&(xa=mxUtils.button(mxResources.get("preview"),function(){q.hideDialog();ba(!1)}),xa.className="geBtn",F.appendChild(xa));xa=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){q.hideDialog();ba(!0)});xa.className="geBtn gePrimaryBtn";F.appendChild(xa);q.editor.cancelFirst||F.appendChild(ea);ca.appendChild(F);this.container=ca};var Y=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=
+function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var q=this.image;null!=q&&null!=q.src&&Graph.isPageLink(q.src)&&(q={originalSrc:q.src});this.page.viewState.backgroundImage=q}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=
+this.shadowVisible)}}else Y.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var W=document.createElement("canvas"),ka=new Image;ka.onload=function(){try{W.getContext("2d").drawImage(ka,
+0,0);var q=W.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=q&&6<q.length}catch(F){}};ka.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(q){}Editor.prototype.useCanvasForExport=!1})();
+(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(d,g,l){l.ui=d.ui;return g};b.afterDecode=function(d,g,l){l.previousColor=l.color;l.previousImage=l.image;l.previousFormat=l.format;null!=l.foldingEnabled&&(l.foldingEnabled=!l.foldingEnabled);null!=l.mathEnabled&&(l.mathEnabled=!l.mathEnabled);null!=l.shadowVisible&&(l.shadowVisible=!l.shadowVisible);return l};mxCodecRegistry.register(b)})();
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(d,g,l){l.ui=d.ui;return g};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.3.3";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&
"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,
-mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(d,f,g,x,y,t,G){t=null!=t?t:0<=d.indexOf("NetworkError")||0<=d.indexOf("SecurityError")||0<=d.indexOf("NS_ERROR_FAILURE")||0<=d.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
-"1"!=urlParams.dev)try{if(d!=EditorUi.lastErrorMessage&&(null==d||null==f||-1==d.indexOf("Script error")&&-1==d.indexOf("extension"))&&null!=d&&0>d.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=d;var D=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";y=null!=y?y:Error(d);(new Image).src=D+"/log?severity="+t+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(g)+(null!=x?":colno:"+
-encodeURIComponent(x):"")+(null!=y&&null!=y.stack?"&stack="+encodeURIComponent(y.stack):"")}}catch(I){}try{G||null==window.console||console.error(t,d,f,g,x,y)}catch(I){}};EditorUi.logEvent=function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);else if(EditorUi.enableLogging)try{var f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=f+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=d?"&data="+encodeURIComponent(JSON.stringify(d)):"")}catch(g){}};EditorUi.sendReport=
-function(d,f){if("1"==urlParams.dev)EditorUi.debug("sendReport",d);else if(EditorUi.enableLogging)try{f=null!=f?f:5E4,d.length>f&&(d=d.substring(0,f)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(d))}catch(g){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var d=[(new Date).toISOString()],f=0;f<arguments.length;f++)d.push(arguments[f]);console.log.apply(console,
-d)}}catch(g){}};EditorUi.removeChildNodes=function(d){for(;null!=d.firstChild;)d.removeChild(d.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
+mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(e,f,k,z,t,B,I){B=null!=B?B:0<=e.indexOf("NetworkError")||0<=e.indexOf("SecurityError")||0<=e.indexOf("NS_ERROR_FAILURE")||0<=e.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
+"1"!=urlParams.dev)try{if(e!=EditorUi.lastErrorMessage&&(null==e||null==f||-1==e.indexOf("Script error")&&-1==e.indexOf("extension"))&&null!=e&&0>e.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=e;var O=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";t=null!=t?t:Error(e);(new Image).src=O+"/log?severity="+B+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(e)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(k)+(null!=z?":colno:"+
+encodeURIComponent(z):"")+(null!=t&&null!=t.stack?"&stack="+encodeURIComponent(t.stack):"")}}catch(J){}try{I||null==window.console||console.error(B,e,f,k,z,t)}catch(J){}};EditorUi.logEvent=function(e){if("1"==urlParams.dev)EditorUi.debug("logEvent",e);else if(EditorUi.enableLogging)try{var f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=f+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=e?"&data="+encodeURIComponent(JSON.stringify(e)):"")}catch(k){}};EditorUi.sendReport=
+function(e,f){if("1"==urlParams.dev)EditorUi.debug("sendReport",e);else if(EditorUi.enableLogging)try{f=null!=f?f:5E4,e.length>f&&(e=e.substring(0,f)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(e))}catch(k){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var e=[(new Date).toISOString()],f=0;f<arguments.length;f++)e.push(arguments[f]);console.log.apply(console,
+e)}}catch(k){}};EditorUi.removeChildNodes=function(e){for(;null!=e.firstChild;)e.removeChild(e.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=
-!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var d=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!d.getContext||!d.getContext("2d"))}catch(y){}try{var f=document.createElement("canvas"),g=new Image;g.onload=function(){try{f.getContext("2d").drawImage(g,0,0);var y=
-f.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=y&&6<y.length}catch(t){}};g.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(y){}try{f=document.createElement("canvas");f.width=f.height=1;var x=f.toDataURL("image/jpeg");
-EditorUi.prototype.jpgSupported=null!==x.match("image/jpeg")}catch(y){}})();EditorUi.prototype.openLink=function(d,f,g){return this.editor.graph.openLink(d,f,g)};EditorUi.prototype.showSplash=function(d){};EditorUi.prototype.getLocalData=function(d,f){f(localStorage.getItem(d))};EditorUi.prototype.setLocalData=function(d,f,g){localStorage.setItem(d,f);null!=g&&g()};EditorUi.prototype.removeLocalData=function(d,f){localStorage.removeItem(d);f()};EditorUi.prototype.setShareCursorPosition=function(d){this.shareCursorPosition=
-d;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(d){this.showRemoteCursors=d;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(d){this.editor.graph.mathEnabled=d;this.editor.updateGraphComponents();this.editor.graph.refresh();
-this.editor.graph.defaultMathEnabled=d;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(d){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(d){return this.isOfflineApp()||!navigator.onLine||!d&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};
-EditorUi.prototype.createSpinner=function(d,f,g){var x=null==d||null==f;g=null!=g?g:24;var y=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),t=y.spin;y.spin=function(D,I){var H=!1;this.active||(t.call(this,D),this.active=!0,null!=I&&(x&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2),H=document.createElement("div"),
-H.style.position="absolute",H.style.whiteSpace="nowrap",H.style.background="#4B4243",H.style.color="white",H.style.fontFamily=Editor.defaultHtmlFont,H.style.fontSize="9pt",H.style.padding="6px",H.style.paddingLeft="10px",H.style.paddingRight="10px",H.style.zIndex=2E9,H.style.left=Math.max(0,d)+"px",H.style.top=Math.max(0,f+70)+"px",mxUtils.setPrefixedStyle(H.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(H.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(H.style,
-"boxShadow","2px 2px 3px 0px #ddd"),"..."!=I.substring(I.length-3,I.length)&&"!"!=I.charAt(I.length-1)&&(I+="..."),H.innerHTML=I,D.appendChild(H),y.status=H),this.pause=mxUtils.bind(this,function(){var S=function(){};this.active&&(S=mxUtils.bind(this,function(){this.spin(D,I)}));this.stop();return S}),H=!0);return H};var G=y.stop;y.stop=function(){G.call(this);this.active=!1;null!=y.status&&null!=y.status.parentNode&&y.status.parentNode.removeChild(y.status);y.status=null};y.pause=function(){return function(){}};
-return y};EditorUi.prototype.isCompatibleString=function(d){try{var f=mxUtils.parseXml(d),g=this.editor.extractGraphModel(f.documentElement,!0);return null!=g&&0==g.getElementsByTagName("parsererror").length}catch(x){}return!1};EditorUi.prototype.isVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&
-3==d.charCodeAt(2)&&4==d.charCodeAt(3)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&3==d.charCodeAt(2)&&6==d.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||60==d.charCodeAt(0)&&63==d.charCodeAt(1)&&120==d.charCodeAt(2)&&109==d.charCodeAt(3)&&108==d.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;
-EditorUi.prototype.createKeyHandler=function(d){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var g=f.getFunction,x=this.editor.graph,y=this;f.getFunction=function(t){if(x.isSelectionEmpty()&&null!=y.pages&&0<y.pages.length){var G=y.getSelectedPageIndex();if(mxEvent.isShiftDown(t)){if(37==t.keyCode)return function(){0<G&&y.movePage(G,G-1)};if(38==t.keyCode)return function(){0<G&&y.movePage(G,0)};if(39==t.keyCode)return function(){G<y.pages.length-1&&y.movePage(G,
-G+1)};if(40==t.keyCode)return function(){G<y.pages.length-1&&y.movePage(G,y.pages.length-1)}}else if(mxEvent.isControlDown(t)||mxClient.IS_MAC&&mxEvent.isMetaDown(t)){if(37==t.keyCode)return function(){0<G&&y.selectNextPage(!1)};if(38==t.keyCode)return function(){0<G&&y.selectPage(y.pages[0])};if(39==t.keyCode)return function(){G<y.pages.length-1&&y.selectNextPage(!0)};if(40==t.keyCode)return function(){G<y.pages.length-1&&y.selectPage(y.pages[y.pages.length-1])}}}return!(65<=t.keyCode&&90>=t.keyCode)||
-x.isSelectionEmpty()||mxEvent.isAltDown(t)||mxEvent.isShiftDown(t)||mxEvent.isControlDown(t)||mxClient.IS_MAC&&mxEvent.isMetaDown(t)?g.apply(this,arguments):null}}return f};var e=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(d){var f=e.apply(this,arguments);if(null==f)try{var g=d.indexOf("&lt;mxfile ");if(0<=g){var x=d.lastIndexOf("&lt;/mxfile&gt;");x>g&&(f=d.substring(g,x+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,
-""))}else{var y=mxUtils.parseXml(d),t=this.editor.extractGraphModel(y.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);f=null!=t?mxUtils.getXml(t):""}}catch(G){}return f};EditorUi.prototype.validateFileData=function(d){if(null!=d&&0<d.length){var f=d.indexOf('<meta charset="utf-8">');0<=f&&(d=d.slice(0,f)+'<meta charset="utf-8"/>'+d.slice(f+23-1,d.length));d=Graph.zapGremlins(d)}return d};EditorUi.prototype.replaceFileData=function(d){d=this.validateFileData(d);
-d=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null;var f=null!=d?this.editor.extractGraphModel(d,!0):null;null!=f&&(d=f);if(null!=d){f=this.editor.graph;f.model.beginUpdate();try{var g=null!=this.pages?this.pages.slice():null,x=d.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<x.length||1==x.length&&x[0].hasAttribute("name")){this.fileNode=d;this.pages=null!=this.pages?this.pages:[];for(var y=x.length-1;0<=y;y--){var t=this.updatePageRoot(new DiagramPage(x[y]));null==t.getName()&&
-t.setName(mxResources.get("pageWithNumber",[y+1]));f.model.execute(new ChangePage(this,t,0==y?t:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=d.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(d.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),f.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(d),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);
-if(null!=g)for(y=0;y<g.length;y++)f.model.execute(new ChangePage(this,g[y],null))}finally{f.model.endUpdate()}}};EditorUi.prototype.createFileData=function(d,f,g,x,y,t,G,D,I,H,S){f=null!=f?f:this.editor.graph;y=null!=y?y:!1;I=null!=I?I:!0;var T=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var M="_blank";else T=M=x;if(null==d)return"";var fa=d;if("mxfile"!=fa.nodeName.toLowerCase()){if(S){var la=d.ownerDocument.createElement("diagram");la.setAttribute("id",Editor.guid());
-la.appendChild(d)}else{la=Graph.zapGremlins(mxUtils.getXml(d));fa=Graph.compress(la);if(Graph.decompress(fa)!=la)return la;la=d.ownerDocument.createElement("diagram");la.setAttribute("id",Editor.guid());mxUtils.setTextContent(la,fa)}fa=d.ownerDocument.createElement("mxfile");fa.appendChild(la)}H?(fa=fa.cloneNode(!0),fa.removeAttribute("modified"),fa.removeAttribute("host"),fa.removeAttribute("agent"),fa.removeAttribute("etag"),fa.removeAttribute("userAgent"),fa.removeAttribute("version"),fa.removeAttribute("editor"),
-fa.removeAttribute("type")):(fa.removeAttribute("userAgent"),fa.removeAttribute("version"),fa.removeAttribute("editor"),fa.removeAttribute("pages"),fa.removeAttribute("type"),mxClient.IS_CHROMEAPP?fa.setAttribute("host","Chrome"):EditorUi.isElectronApp?fa.setAttribute("host","Electron"):fa.setAttribute("host",window.location.hostname),fa.setAttribute("modified",(new Date).toISOString()),fa.setAttribute("agent",navigator.appVersion),fa.setAttribute("version",EditorUi.VERSION),fa.setAttribute("etag",
-Editor.guid()),d=null!=g?g.getMode():this.mode,null!=d&&fa.setAttribute("type",d),1<fa.getElementsByTagName("diagram").length&&null!=this.pages&&fa.setAttribute("pages",this.pages.length));S=S?mxUtils.getPrettyXml(fa):mxUtils.getXml(fa);if(!t&&!y&&(G||null!=g&&/(\.html)$/i.test(g.getTitle())))S=this.getHtml2(mxUtils.getXml(fa),f,null!=g?g.getTitle():null,M,T);else if(t||!y&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(x=null),S=this.getEmbeddedSvg(S,
-f,x,null,D,I,T);return S};EditorUi.prototype.getXmlFileData=function(d,f,g,x){d=null!=d?d:!0;f=null!=f?f:!1;g=null!=g?g:!Editor.compressXml;var y=this.editor.getGraphXml(d,x);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(I){var H=I.getElementsByTagName("mxGraphModel");H=0<H.length?H[0]:null;null==H&&g?(H=mxUtils.trim(mxUtils.getTextContent(I)),I=I.cloneNode(!1),0<H.length&&(H=Graph.decompress(H),null!=H&&0<H.length&&I.appendChild(mxUtils.parseXml(H).documentElement))):null==H||g?
-I=I.cloneNode(!0):(I=I.cloneNode(!1),mxUtils.setTextContent(I,Graph.compressNode(H)));y.appendChild(I)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(y)),y=this.fileNode.cloneNode(!1),f)d(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var t=this.pages[f],G=t.node;if(t!=this.currentPage)if(t.needsUpdate){var D=new mxCodec(mxUtils.createXmlDocument());D=D.encode(new mxGraphModel(t.root));this.editor.graph.saveViewState(t.viewState,
-D,null,x);EditorUi.removeChildNodes(G);mxUtils.setTextContent(G,Graph.compressNode(D));delete t.needsUpdate}else x&&(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&&(D=new mxCodec(mxUtils.createXmlDocument()),D=D.encode(new mxGraphModel(t.root)),this.editor.graph.saveViewState(t.viewState,D,null,x),G=G.cloneNode(!1),mxUtils.setTextContent(G,Graph.compressNode(D))));d(G)}return y};EditorUi.prototype.anonymizeString=function(d,f){for(var g=[],x=0;x<d.length;x++){var y=d.charAt(x);0<=EditorUi.ignoredAnonymizedChars.indexOf(y)?g.push(y):isNaN(parseInt(y))?y.toLowerCase()!=y?g.push(String.fromCharCode(65+Math.round(25*
-Math.random()))):y.toUpperCase()!=y?g.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(y)?g.push(" "):g.push("?"):g.push(f?"0":Math.round(9*Math.random()))}return g.join("")};EditorUi.prototype.anonymizePatch=function(d){if(null!=d[EditorUi.DIFF_INSERT])for(var f=0;f<d[EditorUi.DIFF_INSERT].length;f++)try{var g=mxUtils.parseXml(d[EditorUi.DIFF_INSERT][f].data).documentElement.cloneNode(!1);null!=g.getAttribute("name")&&g.setAttribute("name",this.anonymizeString(g.getAttribute("name")));
-d[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(g)}catch(t){d[EditorUi.DIFF_INSERT][f].data=t.message}if(null!=d[EditorUi.DIFF_UPDATE]){for(var x in d[EditorUi.DIFF_UPDATE]){var y=d[EditorUi.DIFF_UPDATE][x];null!=y.name&&(y.name=this.anonymizeString(y.name));null!=y.cells&&(f=mxUtils.bind(this,function(t){var G=y.cells[t];if(null!=G){for(var D in G)null!=G[D].value&&(G[D].value="["+G[D].value.length+"]"),null!=G[D].xmlValue&&(G[D].xmlValue="["+G[D].xmlValue.length+"]"),null!=G[D].style&&(G[D].style=
-"["+G[D].style.length+"]"),mxUtils.isEmptyObject(G[D])&&delete G[D];mxUtils.isEmptyObject(G)&&delete y.cells[t]}}),f(EditorUi.DIFF_INSERT),f(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(y.cells)&&delete y.cells);mxUtils.isEmptyObject(y)&&delete d[EditorUi.DIFF_UPDATE][x]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};EditorUi.prototype.anonymizeAttributes=function(d,f){if(null!=d.attributes)for(var g=0;g<d.attributes.length;g++)"as"!=d.attributes[g].name&&
-d.setAttribute(d.attributes[g].name,this.anonymizeString(d.attributes[g].value,f));if(null!=d.childNodes)for(g=0;g<d.childNodes.length;g++)this.anonymizeAttributes(d.childNodes[g],f)};EditorUi.prototype.anonymizeNode=function(d,f){f=d.getElementsByTagName("mxCell");for(var g=0;g<f.length;g++)null!=f[g].getAttribute("value")&&f[g].setAttribute("value","["+f[g].getAttribute("value").length+"]"),null!=f[g].getAttribute("xmlValue")&&f[g].setAttribute("xmlValue","["+f[g].getAttribute("xmlValue").length+
-"]"),null!=f[g].getAttribute("style")&&f[g].setAttribute("style","["+f[g].getAttribute("style").length+"]"),null!=f[g].parentNode&&"root"!=f[g].parentNode.nodeName&&null!=f[g].parentNode.parentNode&&(f[g].setAttribute("id",f[g].parentNode.getAttribute("id")),f[g].parentNode.parentNode.replaceChild(f[g],f[g].parentNode));return d};EditorUi.prototype.synchronizeCurrentFile=function(d){var f=this.getCurrentFile();null!=f&&(f.savingFile?this.handleError({message:mxResources.get("busy")}):!d&&f.invalidChecksum?
-f.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(f.clearAutosave(),this.editor.setStatus(""),d?f.reloadFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)})):f.synchronizeFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(d,f,g,x,y,t,G,
-D,I,H,S){y=null!=y?y:!0;t=null!=t?t:!1;var T=this.editor.graph;if(f||!d&&null!=I&&/(\.svg)$/i.test(I.getTitle())){var M=null!=T.themes&&"darkTheme"==T.defaultThemeName;H=!1;if(M||null!=this.pages&&this.currentPage!=this.pages[0]){var fa=T.getGlobalVariable;T=this.createTemporaryGraph(M?T.getDefaultStylesheet():T.getStylesheet());T.setBackgroundImage=this.editor.graph.setBackgroundImage;T.background=this.editor.graph.background;var la=this.pages[0];this.currentPage==la?T.setBackgroundImage(this.editor.graph.backgroundImage):
-null!=la.viewState&&null!=la.viewState&&T.setBackgroundImage(la.viewState.backgroundImage);T.getGlobalVariable=function(ra){return"page"==ra?la.getName():"pagenumber"==ra?1:fa.apply(this,arguments)};document.body.appendChild(T.container);T.model.setRoot(la.root)}}G=null!=G?G:this.getXmlFileData(y,t,H,S);I=null!=I?I:this.getCurrentFile();d=this.createFileData(G,T,I,window.location.href,d,f,g,x,y,D,H);T!=this.editor.graph&&T.container.parentNode.removeChild(T.container);return d};EditorUi.prototype.getHtml=
-function(d,f,g,x,y,t){t=null!=t?t:!0;var G=null,D=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){G=t?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var I=f.view.scale;t=Math.floor(G.x/I-f.view.translate.x);I=Math.floor(G.y/I-f.view.translate.y);G=f.background;null==y&&(f=this.getBasenames().join(";"),0<f.length&&(D=EditorUi.drawHost+"/embed.js?s="+f));d.setAttribute("x0",t);d.setAttribute("y0",I)}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!=x&&d.setAttribute("edit",x));null!=y&&(y=y.replace(/&/g,"&amp;"));d=null!=d?Graph.zapGremlins(mxUtils.getXml(d)):"";x=Graph.compress(d);Graph.decompress(x)!=d&&(x=encodeURIComponent(d));return(null==y?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=y?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==y?null!=g?
-"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=y?'<meta http-equiv="refresh" content="0;URL=\''+y+"'\"/>\n":"")+"</head>\n<body"+(null==y&&null!=G&&G!=mxConstants.NONE?' style="background-color:'+G+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+x+"</div>\n</div>\n"+(null==y?'<script type="text/javascript" src="'+D+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
-y+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(d,f,g,x,y){f=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=y&&(y=y.replace(/&/g,"&amp;"));d={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(d),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage));
-return(null==y?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=y?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==y?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=y?'<meta http-equiv="refresh" content="0;URL=\''+y+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+
-mxUtils.htmlEntities(JSON.stringify(d))+'"></div>\n'+(null==y?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+y+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(d){d=this.validateFileData(d);this.pages=this.fileNode=this.currentPage=null;var f=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:
-null,g=Editor.extractParserError(f,mxResources.get("invalidOrMissingFile"));if(g)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[d],"node",[f],"cause",[g]),Error(mxResources.get("notADiagramFile")+" ("+g+")");d=null!=f?this.editor.extractGraphModel(f,!0):null;null!=d&&(f=d);if(null!=f&&"mxfile"==f.nodeName&&(d=f.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name"))){g=null;this.fileNode=f;this.pages=[];for(var x=0;x<d.length;x++)null==
-d[x].getAttribute("id")&&d[x].setAttribute("id",x),f=new DiagramPage(d[x]),null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[x+1])),this.pages.push(f),null!=urlParams["page-id"]&&f.getId()==urlParams["page-id"]&&(g=f);this.currentPage=null!=g?g:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];f=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=f&&(this.fileNode=f.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(f.ownerDocument.createElement("diagram")),
-this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(f);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var y=urlParams["layer-ids"].split(" ");f={};for(x=0;x<y.length;x++)f[y[x]]=!0;var t=this.editor.graph.getModel(),G=t.getChildren(t.root);for(x=0;x<G.length;x++){var D=G[x];t.setVisible(D,f[D.id]||!1)}}catch(I){}};EditorUi.prototype.getBaseFilename=function(d){var f=
-this.getCurrentFile();f=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(f)||/(\.html)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.png)$/i.test(f))f=f.substring(0,f.lastIndexOf("."));/(\.drawio)$/i.test(f)&&(f=f.substring(0,f.lastIndexOf(".")));!d&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(f=f+"-"+this.currentPage.getName());return f};EditorUi.prototype.downloadFile=
-function(d,f,g,x,y,t,G,D,I,H,S,T){try{x=null!=x?x:this.editor.graph.isSelectionEmpty();var M=this.getBaseFilename("remoteSvg"==d?!1:!y),fa=M+("xml"==d||"pdf"==d&&S?".drawio":"")+"."+d;if("xml"==d){var la=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,x,y,null,null,null,f);this.saveData(fa,d,la,"text/xml")}else if("html"==d)la=this.getHtml2(this.getFileData(!0),this.editor.graph,M),this.saveData(fa,d,la,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==
-d)fa=M+".png";else if("jpeg"==d)fa=M+".jpg";else if("remoteSvg"==d){fa=M+".svg";d="svg";var ra=parseInt(I);"string"===typeof D&&0<D.indexOf("%")&&(D=parseInt(D)/100);if(0<ra){var ba=this.editor.graph,oa=ba.getGraphBounds();var na=Math.ceil(oa.width*D/ba.view.scale+2*ra);var N=Math.ceil(oa.height*D/ba.view.scale+2*ra)}}this.saveRequest(fa,d,mxUtils.bind(this,function(ia,q){try{var E=this.editor.graph.pageVisible;0==t&&(this.editor.graph.pageVisible=t);var Q=this.createDownloadRequest(ia,d,x,q,G,y,
-D,I,H,S,T,na,N);this.editor.graph.pageVisible=E;return Q}catch(Y){this.handleError(Y)}}))}else{var aa=null,V=mxUtils.bind(this,function(ia){ia.length<=MAX_REQUEST_SIZE?this.saveData(fa,"svg",ia,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(aa)}))});if("svg"==d){var ha=this.editor.graph.background;if(G||ha==mxConstants.NONE)ha=null;var X=this.editor.graph.getSvg(ha,null,null,null,null,x);g&&this.editor.graph.addSvgShadow(X);
-this.editor.convertImages(X,mxUtils.bind(this,mxUtils.bind(this,function(ia){this.spinner.stop();V(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(ia))})))}else fa=M+".svg",aa=this.getFileData(!1,!0,null,mxUtils.bind(this,function(ia){this.spinner.stop();V(ia)}),x)}}catch(ia){this.handleError(ia)}};EditorUi.prototype.createDownloadRequest=function(d,f,g,x,y,t,G,D,I,H,S,T,M){var fa=this.editor.graph,la=fa.getGraphBounds();g=this.getFileData(!0,null,null,null,g,0==t?!1:"xmlpng"!=f,null,
-null,null,!1,"pdf"==f);var ra="",ba="";if(la.width*la.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};H=H?"1":"0";"pdf"==f&&(null!=S?ba="&from="+S.from+"&to="+S.to:0==t&&(ba="&allPages=1"));"xmlpng"==f&&(H="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(t=0;t<this.pages.length;t++)if(this.pages[t]==this.currentPage){ra="&from="+t;break}t=fa.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!y?y||null!=t&&t!=mxConstants.NONE||
-(t="#ffffff"):t=mxConstants.NONE;y={globalVars:fa.getExportVariables()};I&&(y.grid={size:fa.gridSize,steps:fa.view.gridSteps,color:fa.view.gridColor});Graph.translateDiagram&&(y.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+f+ra+ba+"&bg="+(null!=t?t:mxConstants.NONE)+"&base64="+x+"&embedXml="+H+"&xml="+encodeURIComponent(g)+(null!=d?"&filename="+encodeURIComponent(d):"")+"&extras="+encodeURIComponent(JSON.stringify(y))+(null!=G?"&scale="+G:"")+(null!=D?"&border="+
-D:"")+(T&&isFinite(T)?"&w="+T:"")+(M&&isFinite(M)?"&h="+M:""))};EditorUi.prototype.setMode=function(d,f){this.mode=d};EditorUi.prototype.loadDescriptor=function(d,f,g){var x=window.location.hash,y=mxUtils.bind(this,function(G){var D=null!=d.data?d.data:"";null!=G&&0<G.length&&(0<D.length&&(D+="\n"),D+=G);G=new LocalFile(this,"csv"!=d.format&&0<D.length?D:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);G.getHash=function(){return x};this.fileLoaded(G);
-"csv"==d.format&&this.importCsv(D,mxUtils.bind(this,function(M){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var I=null!=d.interval?parseInt(d.interval):6E4,H=null,S=mxUtils.bind(this,function(){var M=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(fa){M===this.currentPage&&(200<=fa.getStatus()&&300>=fa.getStatus()?(this.updateDiagram(fa.getText()),
-T()):this.handleError({message:mxResources.get("error")+" "+fa.getStatus()}))}),mxUtils.bind(this,function(fa){this.handleError(fa)}))}),T=mxUtils.bind(this,function(){window.clearTimeout(H);H=window.setTimeout(S,I)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){T();S()}));T();S()}null!=f&&f()});if(null!=d.url&&0<d.url.length){var t=this.editor.getProxiedUrl(d.url);this.editor.loadUrl(t,mxUtils.bind(this,function(G){y(G)}),mxUtils.bind(this,function(G){null!=g&&g(G)}))}else y("")};
-EditorUi.prototype.updateDiagram=function(d){function f(N){var aa=new mxCellOverlay(N.image||y.warningImage,N.tooltip,N.align,N.valign,N.offset);aa.addListener(mxEvent.CLICK,function(V,ha){x.alert(N.tooltip)});return aa}var g=null,x=this;if(null!=d&&0<d.length&&(g=mxUtils.parseXml(d),d=null!=g?g.documentElement:null,null!=d&&"updates"==d.nodeName)){var y=this.editor.graph,t=y.getModel();t.beginUpdate();var G=null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var D=t.getCell(d.getAttribute("id"));
-if(null!=D){try{var I=d.getAttribute("value");if(null!=I){var H=mxUtils.parseXml(I).documentElement;if(null!=H)if("1"==H.getAttribute("replace-value"))t.setValue(D,H);else for(var S=H.attributes,T=0;T<S.length;T++)y.setAttributeForCell(D,S[T].nodeName,0<S[T].nodeValue.length?S[T].nodeValue:null)}}catch(N){null!=window.console&&console.log("Error in value for "+D.id+": "+N)}try{var M=d.getAttribute("style");null!=M&&y.model.setStyle(D,M)}catch(N){null!=window.console&&console.log("Error in style for "+
-D.id+": "+N)}try{var fa=d.getAttribute("icon");if(null!=fa){var la=0<fa.length?JSON.parse(fa):null;null!=la&&la.append||y.removeCellOverlays(D);null!=la&&y.addCellOverlay(D,f(la))}}catch(N){null!=window.console&&console.log("Error in icon for "+D.id+": "+N)}try{var ra=d.getAttribute("geometry");if(null!=ra){ra=JSON.parse(ra);var ba=y.getCellGeometry(D);if(null!=ba){ba=ba.clone();for(key in ra){var oa=parseFloat(ra[key]);"dx"==key?ba.x+=oa:"dy"==key?ba.y+=oa:"dw"==key?ba.width+=oa:"dh"==key?ba.height+=
-oa:ba[key]=parseFloat(ra[key])}y.model.setGeometry(D,ba)}}}catch(N){null!=window.console&&console.log("Error in icon for "+D.id+": "+N)}}}else if("model"==d.nodeName){for(var na=d.firstChild;null!=na&&na.nodeType!=mxConstants.NODETYPE_ELEMENT;)na=na.nextSibling;null!=na&&(new mxCodec(d.firstChild)).decode(na,t)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(y.view.scale=parseFloat(d.getAttribute("scale"))),d.hasAttribute("dx")||d.hasAttribute("dy"))y.view.translate=new mxPoint(parseFloat(d.getAttribute("dx")||
-0),parseFloat(d.getAttribute("dy")||0))}else"fit"==d.nodeName&&(G=d.hasAttribute("max-scale")?parseFloat(d.getAttribute("max-scale")):1);d=d.nextSibling}}finally{t.endUpdate()}null!=G&&this.chromelessResize&&this.chromelessResize(!0,G)}return g};EditorUi.prototype.getCopyFilename=function(d,f){var g=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var x=g.lastIndexOf(".");0<=x&&(d=g.substring(x),g=g.substring(0,x));if(f){f=g;var y=new Date;g=y.getFullYear();x=y.getMonth()+1;var t=
-y.getDate(),G=y.getHours(),D=y.getMinutes();y=y.getSeconds();g=f+(" "+(g+"-"+x+"-"+t+"-"+G+"-"+D+"-"+y))}return g=mxResources.get("copyOf",[g])+d};EditorUi.prototype.fileLoaded=function(d,f){var g=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var x=!1;this.hideDialog();null!=g&&(EditorUi.debug("File.closed",[g]),g.removeListener(this.descriptorChangedListener),g.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var y=mxUtils.bind(this,
-function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=g&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!f&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerText="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();f||this.showSplash()});if(null!=d)try{mxClient.IS_SF&&
-"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(d);d.addListener("descriptorChanged",this.descriptorChangedListener);d.addListener("contentChanged",this.descriptorChangedListener);d.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(d.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();d.isEditable()?d.isModified()?(d.addUnsavedStatus(),null!=d.backupPatch&&
-d.patch([d.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));
-x=!0;if(!this.isOffline()&&null!=d.getMode()){var t="1"==urlParams.sketch?"sketch":uiTheme;if(null==t)t="default";else if("sketch"==t||"min"==t)t+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:d.getMode().toUpperCase()+"-OPEN-FILE-"+d.getHash(),action:"size_"+d.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+t})}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(G){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(G){}}catch(G){this.fileLoadedError=G;if(null!=d)try{d.close()}catch(D){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=d?d.getHash():"none"),action:"message_"+G.message,label:"stack_"+G.stack})}catch(D){}d=mxUtils.bind(this,
-function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=g?this.fileLoaded(g)||y():y()});f?d():this.handleError(G,mxResources.get("errorLoadingFile"),d,!0,null,null,!0)}else y();return x};EditorUi.prototype.getHashValueForPages=function(d,f){var g=0,x=new mxGraphModel,y=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var t=0;t<d.length;t++){this.updatePageRoot(d[t]);var G=
-d[t].node.cloneNode(!1);G.removeAttribute("name");x.root=d[t].root;var D=y.encode(x);this.editor.graph.saveViewState(d[t].viewState,D,!0);D.removeAttribute("pageWidth");D.removeAttribute("pageHeight");G.appendChild(D);null!=f&&(f.eltCount+=G.getElementsByTagName("*").length,f.nodeCount+=G.getElementsByTagName("mxCell").length);g=(g<<5)-g+this.hashValue(G,function(I,H,S,T){return!T||"mxGeometry"!=I.nodeName&&"mxPoint"!=I.nodeName||"x"!=H&&"y"!=H&&"width"!=H&&"height"!=H?T&&"mxCell"==I.nodeName&&"previous"==
-H?null:S:Math.round(S)},f)<<0}return g};EditorUi.prototype.hashValue=function(d,f,g){var x=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(x^=this.hashValue(d.nodeName,f,g));if(null!=d.attributes){null!=g&&(g.attrCount+=d.attributes.length);for(var y=0;y<d.attributes.length;y++){var t=d.attributes[y].name,G=null!=f?f(d,t,d.attributes[y].value,!0):d.attributes[y].value;null!=G&&(x^=this.hashValue(t,
-f,g)+this.hashValue(G,f,g))}}if(null!=d.childNodes)for(y=0;y<d.childNodes.length;y++)x=(x<<5)-x+this.hashValue(d.childNodes[y],f,g)<<0}else if(null!=d&&"function"!==typeof d){d=String(d);f=0;null!=g&&(g.byteCount+=d.length);for(y=0;y<d.length;y++)f=(f<<5)-f+d.charCodeAt(y)<<0;x^=f}return x};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(d,f,g,x,y,t,G){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||
-mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(d){null==d&&(d=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,d,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(d){var f=mxUtils.createXmlDocument(),g=f.createElement("mxlibrary");mxUtils.setTextContent(g,JSON.stringify(d));f.appendChild(g);
-return mxUtils.getXml(f)};EditorUi.prototype.closeLibrary=function(d){null!=d&&(this.removeLibrarySidebar(d.getHash()),d.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(d.getHash()),".scratchpad"==d.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(d){var f=this.sidebar.palettes[d];if(null!=f){for(var g=0;g<f.length;g++)f[g].parentNode.removeChild(f[g]);delete this.sidebar.palettes[d]}};EditorUi.prototype.repositionLibrary=function(d){var f=this.sidebar.container;
-if(null==d){var g=this.sidebar.palettes["L.scratchpad"];null==g&&(g=this.sidebar.palettes.search);null!=g&&(d=g[g.length-1].nextSibling)}d=null!=d?d:f.firstChild.nextSibling.nextSibling;g=f.lastChild;var x=g.previousSibling;f.insertBefore(g,d);f.insertBefore(x,g)};EditorUi.prototype.loadLibrary=function(d,f){var g=mxUtils.parseXml(d.getData());if("mxlibrary"==g.documentElement.nodeName){var x=JSON.parse(mxUtils.getTextContent(g.documentElement));this.libraryLoaded(d,x,g.documentElement.getAttribute("title"),
-f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(d){return""};EditorUi.prototype.libraryLoaded=function(d,f,g,x){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());".scratchpad"==d.title&&(this.scratchpad=d);var y=this.sidebar.palettes[d.getHash()];y=null!=y?y[y.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var t=null,G=mxUtils.bind(this,function(na,N){0==na.length&&d.isEditable()?
-(null==t&&(t=document.createElement("div"),t.className="geDropTarget",mxUtils.write(t,mxResources.get("dragElementsHere"))),N.appendChild(t)):this.addLibraryEntries(na,N)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==g&&(g=d.getTitle(),null!=g&&/(\.xml)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf("."))));var D=this.sidebar.addPalette(d.getHash(),g,null!=x?x:!0,mxUtils.bind(this,function(na){G(f,na)}));this.repositionLibrary(y);var I=D.parentNode.previousSibling;x=I.getAttribute("title");
-null!=x&&0<x.length&&".scratchpad"!=d.title&&I.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+x);var H=document.createElement("div");H.style.position="absolute";H.style.right="0px";H.style.top="0px";H.style.padding="8px";H.style.backgroundColor="inherit";I.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 T=null;if(".scratchpad"!=d.title||this.closableScratchpad)H.appendChild(S),mxEvent.addListener(S,"click",mxUtils.bind(this,function(na){if(!mxEvent.isConsumed(na)){var N=mxUtils.bind(this,function(){this.closeLibrary(d)});null!=T?this.confirm(mxResources.get("allChangesLost"),null,N,mxResources.get("cancel"),mxResources.get("discardChanges")):N();mxEvent.consume(na)}}));if(d.isEditable()){var M=
-this.editor.graph,fa=null,la=mxUtils.bind(this,function(na){this.showLibraryDialog(d.getTitle(),D,f,d,d.getMode());mxEvent.consume(na)}),ra=mxUtils.bind(this,function(na){d.setModified(!0);d.isAutosave()?(null!=fa&&null!=fa.parentNode&&fa.parentNode.removeChild(fa),fa=S.cloneNode(!1),fa.setAttribute("src",Editor.spinImage),fa.setAttribute("title",mxResources.get("saving")),fa.style.cursor="default",fa.style.marginRight="2px",fa.style.marginTop="-2px",H.insertBefore(fa,H.firstChild),I.style.paddingRight=
-18*H.childNodes.length+"px",this.saveLibrary(d.getTitle(),f,d,d.getMode(),!0,!0,function(){null!=fa&&null!=fa.parentNode&&(fa.parentNode.removeChild(fa),I.style.paddingRight=18*H.childNodes.length+"px")})):null==T&&(T=S.cloneNode(!1),T.setAttribute("src",Editor.saveImage),T.setAttribute("title",mxResources.get("save")),H.insertBefore(T,H.firstChild),mxEvent.addListener(T,"click",mxUtils.bind(this,function(N){this.saveLibrary(d.getTitle(),f,d,d.getMode(),d.constructor==LocalLibrary,!0,function(){null==
-T||d.isModified()||(I.style.paddingRight=18*H.childNodes.length+"px",T.parentNode.removeChild(T),T=null)});mxEvent.consume(N)})),I.style.paddingRight=18*H.childNodes.length+"px")}),ba=mxUtils.bind(this,function(na,N,aa,V){na=M.cloneCells(mxUtils.sortCells(M.model.getTopmostCells(na)));for(var ha=0;ha<na.length;ha++){var X=M.getCellGeometry(na[ha]);null!=X&&X.translate(-N.x,-N.y)}D.appendChild(this.sidebar.createVertexTemplateFromCells(na,N.width,N.height,V||"",!0,null,!1));na={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(na))),
-w:N.width,h:N.height};null!=V&&(na.title=V);f.push(na);ra(aa);null!=t&&null!=t.parentNode&&0<f.length&&(t.parentNode.removeChild(t),t=null)}),oa=mxUtils.bind(this,function(na){if(M.isSelectionEmpty())M.getRubberband().isActive()?(M.getRubberband().execute(na),M.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var N=M.getSelectionCells(),aa=M.view.getBounds(N),V=M.view.scale;aa.x/=V;aa.y/=V;aa.width/=V;aa.height/=V;aa.x-=
-M.view.translate.x;aa.y-=M.view.translate.y;ba(N,aa)}mxEvent.consume(na)});mxEvent.addGestureListeners(D,function(){},mxUtils.bind(this,function(na){M.isMouseDown&&null!=M.panningManager&&null!=M.graphHandler.first&&(M.graphHandler.suspend(),null!=M.graphHandler.hint&&(M.graphHandler.hint.style.visibility="hidden"),D.style.backgroundColor="#f1f3f4",D.style.cursor="copy",M.panningManager.stop(),M.autoScroll=!1,mxEvent.consume(na))}),mxUtils.bind(this,function(na){M.isMouseDown&&null!=M.panningManager&&
-null!=M.graphHandler&&(D.style.backgroundColor="",D.style.cursor="default",this.sidebar.showTooltips=!0,M.panningManager.stop(),M.graphHandler.reset(),M.isMouseDown=!1,M.autoScroll=!0,oa(na),mxEvent.consume(na))}));mxEvent.addListener(D,"mouseleave",mxUtils.bind(this,function(na){M.isMouseDown&&null!=M.graphHandler.first&&(M.graphHandler.resume(),null!=M.graphHandler.hint&&(M.graphHandler.hint.style.visibility="visible"),D.style.backgroundColor="",D.style.cursor="",M.autoScroll=!0)}));Graph.fileSupport&&
-(mxEvent.addListener(D,"dragover",mxUtils.bind(this,function(na){D.style.backgroundColor="#f1f3f4";na.dataTransfer.dropEffect="copy";D.style.cursor="copy";this.sidebar.hideTooltip();na.stopPropagation();na.preventDefault()})),mxEvent.addListener(D,"drop",mxUtils.bind(this,function(na){D.style.cursor="";D.style.backgroundColor="";0<na.dataTransfer.files.length&&this.importFiles(na.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(N,aa,V,ha,X,ia,q,E,Q){if(null!=N&&"image/"==aa.substring(0,
-6))N="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(N),N=[new mxCell("",new mxGeometry(0,0,X,ia),N)],N[0].vertex=!0,ba(N,new mxRectangle(0,0,X,ia),na,mxEvent.isAltDown(na)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," ")),null!=t&&null!=t.parentNode&&0<f.length&&(t.parentNode.removeChild(t),t=null);else{var Y=!1,R=mxUtils.bind(this,function(Z,da){null!=Z&&"application/pdf"==da&&(da=Editor.extractGraphModelFromPdf(Z),null!=
-da&&0<da.length&&(Z=da));if(null!=Z)if(Z=mxUtils.parseXml(Z),"mxlibrary"==Z.documentElement.nodeName)try{var qa=JSON.parse(mxUtils.getTextContent(Z.documentElement));G(qa,D);f=f.concat(qa);ra(na);this.spinner.stop();Y=!0}catch(ya){}else if("mxfile"==Z.documentElement.nodeName)try{var va=Z.documentElement.getElementsByTagName("diagram");for(qa=0;qa<va.length;qa++){var ja=this.stringToCells(Editor.getDiagramNodeXml(va[qa])),sa=this.editor.graph.getBoundingBoxFromGeometry(ja);ba(ja,new mxRectangle(0,
-0,sa.width,sa.height),na)}Y=!0}catch(ya){null!=window.console&&console.log("error in drop handler:",ya)}Y||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=t&&null!=t.parentNode&&0<f.length&&(t.parentNode.removeChild(t),t=null)});null!=Q&&null!=q&&(/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q))?this.importVisio(Q,function(Z){R(Z,"text/xml")},null,q):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(N,q)&&null!=Q?this.isExternalDataComms()?
-this.parseFile(Q,mxUtils.bind(this,function(Z){4==Z.readyState&&(this.spinner.stop(),200<=Z.status&&299>=Z.status?R(Z.responseText,"text/xml"):this.handleError({message:mxResources.get(413==Z.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):R(N,aa)}}));na.stopPropagation();na.preventDefault()})),mxEvent.addListener(D,"dragleave",function(na){D.style.cursor="";D.style.backgroundColor=
-"";na.stopPropagation();na.preventDefault()}));S=S.cloneNode(!1);S.setAttribute("src",Editor.editImage);S.setAttribute("title",mxResources.get("edit"));H.insertBefore(S,H.firstChild);mxEvent.addListener(S,"click",la);mxEvent.addListener(D,"dblclick",function(na){mxEvent.getSource(na)==D&&la(na)});x=S.cloneNode(!1);x.setAttribute("src",Editor.plusImage);x.setAttribute("title",mxResources.get("add"));H.insertBefore(x,H.firstChild);mxEvent.addListener(x,"click",oa);this.isOffline()||".scratchpad"!=d.title||
-null==EditorUi.scratchpadHelpLink||(x=document.createElement("span"),x.setAttribute("title",mxResources.get("help")),x.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(x,"?"),mxEvent.addGestureListeners(x,mxUtils.bind(this,function(na){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(na)})),H.insertBefore(x,H.firstChild))}I.appendChild(H);I.style.paddingRight=18*H.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(d,f){for(var g=
-0;g<d.length;g++){var x=d[g],y=x.data;if(null!=y){y=this.convertDataUri(y);var t="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==x.aspect&&(t+="aspect=fixed;");f.appendChild(this.sidebar.createVertexTemplate(t+"image="+y,x.w,x.h,"",x.title||"",!1,null,!0))}else null!=x.xml&&(y=this.stringToCells(Graph.decompress(x.xml)),0<y.length&&f.appendChild(this.sidebar.createVertexTemplateFromCells(y,x.w,x.h,x.title||"",!0,null,!0)))}};EditorUi.prototype.getResource=function(d){return null!=
-d?d[mxLanguage]||d.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=
-41,EditorUi.prototype.toolbarHeight=38):Editor.isDarkMode()&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor=Editor.darkColor,Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.shapeBackgroundColor=Editor.darkColor,Graph.prototype.shapeForegroundColor=Editor.lightColor,Graph.prototype.defaultPageBackgroundColor=Editor.darkColor,Graph.prototype.defaultPageBorderColor="#505759",BaseFormatPanel.prototype.buttonBackgroundColor=
-Editor.darkColor,mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00");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)}];"1"==urlParams.sketch&&("undefined"!==typeof Menus&&(Menus.prototype.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts)),
-Graph.prototype.defaultVertexStyle={hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",orthogonalLoop:"1",endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8"},Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled="1"==urlParams.grid,Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=
-new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(d,f,g,x,y,t,G){d=new ImageDialog(this,d,f,g,x,y,t,G);this.showDialog(d.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,f){d=null!=d?d:mxUtils.bind(this,function(g,x){x||(g=new ChangePageSetup(this,null,g),g.ignoreColor=!0,this.editor.graph.model.execute(g))});d=new BackgroundImageDialog(this,d,f);this.showDialog(d.container,
-400,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,f,g,x,y){d=new LibraryDialog(this,d,f,g,x,y);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(t){t&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));d.init()};var k=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(d){var f=k.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(g){this.editor.graph.isSelectionEmpty()&&
-f.refresh()}));return f};EditorUi.prototype.createSidebarFooterContainer=function(){var d=this.createDiv("geSidebarContainer geSidebarFooter");d.style.position="absolute";d.style.overflow="hidden";var f=document.createElement("a");f.className="geTitle";f.style.color="#DF6C0C";f.style.fontWeight="bold";f.style.height="100%";f.style.paddingTop="9px";f.innerHTML="<span>+</span>";var g=f.getElementsByTagName("span")[0];g.style.fontSize="18px";g.style.marginRight="5px";mxUtils.write(f,mxResources.get("moreShapes")+
-"...");mxEvent.addListener(f,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(x){x.preventDefault()}));mxEvent.addListener(f,"click",mxUtils.bind(this,function(x){this.actions.get("shapes").funct();mxEvent.consume(x)}));d.appendChild(f);return d};EditorUi.prototype.handleError=function(d,f,g,x,y,t,G){var D=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},I=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=
-d.message)try{G?null!=window.console&&console.error("EditorUi.handleError:",d):EditorUi.logError("Caught: "+(""==d.message&&null!=d.name)?d.name:d.message,d.filename,d.lineNumber,d.columnNumber,d,"INFO")}catch(fa){}if(null!=I||null!=f){G=mxUtils.htmlEntities(mxResources.get("unknownError"));var H=mxResources.get("ok"),S=null;f=null!=f?f:mxResources.get("error");if(null!=I){null!=I.retry&&(H=mxResources.get("cancel"),S=function(){D();I.retry()});if(404==I.code||404==I.status||403==I.code){G=403==I.code?
-null!=I.message?mxUtils.htmlEntities(I.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=y?y:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var T=null!=y?null:null!=t?t:window.location.hash;if(null!=T&&("#G"==T.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==T.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==I.code||404==I.status)){T="#U"==T.substring(0,2)?T.substring(45,T.lastIndexOf("%26ex")):T.substring(2);this.showError(f,G,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+T);this.handleError(d,f,g,x,y)}),S,mxResources.get("changeUser"),mxUtils.bind(this,function(){function fa(){oa.innerText="";for(var na=
-0;na<la.length;na++){var N=document.createElement("option");mxUtils.write(N,la[na].displayName);N.value=na;oa.appendChild(N);N=document.createElement("option");N.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(N,"<"+la[na].email+">");N.setAttribute("disabled","disabled");oa.appendChild(N)}N=document.createElement("option");mxUtils.write(N,mxResources.get("addAccount"));N.value=la.length;oa.appendChild(N)}var la=this.drive.getUsersList(),ra=document.createElement("div"),ba=document.createElement("span");
-ba.style.marginTop="6px";mxUtils.write(ba,mxResources.get("changeUser")+": ");ra.appendChild(ba);var oa=document.createElement("select");oa.style.width="200px";fa();mxEvent.addListener(oa,"change",mxUtils.bind(this,function(){var na=oa.value,N=la.length!=na;N&&this.drive.setUser(la[na]);this.drive.authorize(N,mxUtils.bind(this,function(){N||(la=this.drive.getUsersList(),fa())}),mxUtils.bind(this,function(aa){this.handleError(aa)}),!0)}));ra.appendChild(oa);ra=new CustomDialog(this,ra,mxUtils.bind(this,
-function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(ra.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=g&&g()}),480,150);return}}null!=I.message?G=""==I.message&&null!=I.name?mxUtils.htmlEntities(I.name):mxUtils.htmlEntities(I.message):null!=I.response&&null!=I.response.error?G=mxUtils.htmlEntities(I.response.error):"undefined"!==typeof window.App&&(I.code==App.ERROR_TIMEOUT?G=mxUtils.htmlEntities(mxResources.get("timeout")):
-I.code==App.ERROR_BUSY?G=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof I&&0<I.length&&(G=mxUtils.htmlEntities(I)))}var M=t=null;null!=I&&null!=I.helpLink?(t=mxResources.get("help"),M=mxUtils.bind(this,function(){return this.editor.graph.openLink(I.helpLink)})):null!=I&&null!=I.ownerEmail&&(t=mxResources.get("contactOwner"),G+=mxUtils.htmlEntities(" ("+t+": "+I.ownerEmail+")"),M=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(I.ownerEmail))}));this.showError(f,
-G,H,g,S,null,null,t,M,null,null,null,x?g:null)}else null!=g&&g()};EditorUi.prototype.alert=function(d,f,g){d=new ErrorDialog(this,null,d,mxResources.get("ok"),f);this.showDialog(d.container,g||340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(d,f,g,x,y,t){var G=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},D=Math.min(200,28*Math.ceil(d.length/50));d=new ConfirmDialog(this,d,function(){G();null!=f&&f()},function(){G();null!=g&&g()},x,y,null,null,null,null,
-D);this.showDialog(d.container,340,46+D,!0,t);d.init()};EditorUi.prototype.showBanner=function(d,f,g,x){var y=!1;if(!(this.bannerShowing||this["hideBanner"+d]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+d])){var t=document.createElement("div");t.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(t.style,
-"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(t.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(t.style,"transition","all 1s ease");t.className="geBtn gePrimaryBtn";y=document.createElement("img");y.setAttribute("src",IMAGE_PATH+"/logo.png");y.setAttribute("border","0");y.setAttribute("align","absmiddle");y.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";t.appendChild(y);y=document.createElement("img");y.setAttribute("src",
-Dialog.prototype.closeImage);y.setAttribute("title",mxResources.get(x?"doNotShowAgain":"close"));y.setAttribute("border","0");y.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";t.appendChild(y);mxUtils.write(t,f);document.body.appendChild(t);this.bannerShowing=!0;f=document.createElement("div");f.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var G=document.createElement("input");G.setAttribute("type","checkbox");
-G.setAttribute("id","geDoNotShowAgainCheckbox");G.style.marginRight="6px";if(!x){f.appendChild(G);var D=document.createElement("label");D.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(D,mxResources.get("doNotShowAgain"));f.appendChild(D);t.style.paddingBottom="30px";t.appendChild(f)}var I=mxUtils.bind(this,function(){null!=t.parentNode&&(t.parentNode.removeChild(t),this.bannerShowing=!1,G.checked||x)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+
-d]=Date.now(),mxSettings.save()))});mxEvent.addListener(y,"click",mxUtils.bind(this,function(S){mxEvent.consume(S);I()}));var H=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(t.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){I()}),1E3)});mxEvent.addListener(t,"click",mxUtils.bind(this,function(S){var T=mxEvent.getSource(S);T!=G&&T!=D?(null!=g&&g(),I(),mxEvent.consume(S)):H()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(t.style,
-"transform","translate(-50%,0%)")}),500);window.setTimeout(H,3E4);y=!0}return y};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(d,f,g,x){d=d.toDataURL("image/"+g);if(null!=d&&6<d.length)null!=f&&(d=Editor.writeGraphModelToPng(d,"tEXt","mxfile",encodeURIComponent(f))),
-0<x&&(d=Editor.writeGraphModelToPng(d,"pHYs","dpi",x));else throw{message:mxResources.get("unknownError")};return d};EditorUi.prototype.saveCanvas=function(d,f,g,x,y){var t="jpeg"==g?"jpg":g;x=this.getBaseFilename(x)+(null!=f?".drawio":"")+"."+t;d=this.createImageDataUri(d,f,g,y);this.saveData(x,t,d.substring(d.lastIndexOf(",")+1),"image/"+g,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&
-9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(d,f){d=new TextareaDialog(this,d,f,null,null,mxResources.get("close"));this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(d,f,g,x,y,t){"text/xml"!=g||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.html)$/i.test(f)||
-(f=f+"."+(null!=t?t:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)d=x?this.base64ToBlob(d,g):new Blob([d],{type:g}),navigator.msSaveOrOpenBlob(d,f);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==g?mxUtils.popup(d,!0):(g.document.write(d),g.document.close(),g.document.execCommand("SaveAs",!0,f),g.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==g||"image/"!=g.substring(0,6)?this.showTextDialog(f+":",d):this.openInNewWindow(d,g,x);else{var G=
-document.createElement("a");t=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof G.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var D=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);t=65==(D?parseInt(D[2],10):!1)?!1:t}if(t||this.isOffline()){G.href=URL.createObjectURL(x?this.base64ToBlob(d,g):new Blob([d],{type:g}));t?G.download=f:G.setAttribute("target","_blank");document.body.appendChild(G);try{window.setTimeout(function(){URL.revokeObjectURL(G.href)},
-2E4),G.click(),G.parentNode.removeChild(G)}catch(I){}}else this.createEchoRequest(d,f,g,x,y).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,f,g,x,y,t){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,d+(null!=g?"&mime="+g:"")+(null!=y?"&format="+y:"")+(null!=t?"&base64="+t:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(x?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(d,f){f=f||"";d=atob(d);for(var g=d.length,x=Math.ceil(g/1024),y=Array(x),
-t=0;t<x;++t){for(var G=1024*t,D=Math.min(G+1024,g),I=Array(D-G),H=0;G<D;++H,++G)I[H]=d[G].charCodeAt(0);y[t]=new Uint8Array(I)}return new Blob(y,{type:f})};EditorUi.prototype.saveLocalFile=function(d,f,g,x,y,t,G,D){t=null!=t?t:!1;G=null!=G?G:"vsdx"!=y&&(!mxClient.IS_IOS||!navigator.standalone);y=this.getServiceCount(t);isLocalStorage&&y++;var I=4>=y?2:6<y?4:3;f=new CreateDialog(this,f,mxUtils.bind(this,function(H,S){try{if("_blank"==S)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(d,
-g,x);else if(null!=g&&"text/html"==g.substring(0,9)){var T=new EmbedDialog(this,d);this.showDialog(T.container,450,240,!0,!0);T.init()}else{var M=window.open("about:blank");null==M?mxUtils.popup(d,!0):(M.document.write("<pre>"+mxUtils.htmlEntities(d,!1)+"</pre>"),M.document.close())}else S==App.MODE_DEVICE||"download"==S?this.doSaveLocalFile(d,H,g,x,null,D):null!=H&&0<H.length&&this.pickFolder(S,mxUtils.bind(this,function(fa){try{this.exportFile(d,H,g,x,S,fa)}catch(la){this.handleError(la)}}))}catch(fa){this.handleError(fa)}}),
-mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,t,G,null,1<y,I,d,g,x);t=this.isServices(y)?y>I?390:280:160;this.showDialog(f.container,420,t,!0,!0);f.init()};EditorUi.prototype.openInNewWindow=function(d,f,g){var x=window.open("about:blank");null==x||null==x.document?mxUtils.popup(d,!0):("image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"!=f||g?(d=g?d:btoa(unescape(encodeURIComponent(d))),x.document.write('<html><img style="max-width:100%;" src="data:'+
-f+";base64,"+d+'"/></html>')):x.document.write("<html>"+d+"</html>"):x.document.write("<html><pre>"+mxUtils.htmlEntities(d,!1)+"</pre></html>"),x.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(d){if(null!=urlParams.tags){this.tagsDialog=
-this.tagsComponent=null;var f=d(mxUtils.bind(this,function(x){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding=
-"4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,mxClient.IS_IE||mxClient.IS_IE11?(this.tagsComponent.div.style.backgroundColor="#ffffff",this.tagsComponent.div.style.border="2px solid black",this.tagsComponent.div.style.color="#000000"):(this.tagsComponent.div.style.backgroundColor="#000000",this.tagsComponent.div.style.color="#ffffff",mxUtils.setOpacity(this.tagsComponent.div,
-80)));if(null!=this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var y=f.getBoundingClientRect();this.tagsDialog.style.left=y.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+
-4+"px";y=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=y.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(x)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var x=this.editor.graph.getAllTags();f.style.display=0<x.length?"":"none"}))}m.apply(this,arguments);this.editor.addListener("tagsDialogShown",
-mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&
-(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var g=d(mxUtils.bind(this,
-function(x){var y=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",y);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)y.apply(this);else{this.exportDialog=document.createElement("div");var t=g.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";
-this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=t.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";t=mxUtils.getCurrentStyle(this.editor.graph.container);
-this.exportDialog.style.zIndex=t.zIndex;var G=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});G.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(D){G.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var I=this.createImageDataUri(D,null,"png");D=document.createElement("img");D.style.maxWidth="140px";D.style.maxHeight=
-"140px";D.style.cursor="pointer";D.style.backgroundColor="white";D.setAttribute("title",mxResources.get("openInNewWindow"));D.setAttribute("border","0");D.setAttribute("src",I);this.exportDialog.appendChild(D);mxEvent.addListener(D,"click",mxUtils.bind(this,function(){this.openInNewWindow(I.substring(I.indexOf(",")+1),"image/png",!0);y.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D)}),null,null,null,null,null,null,null,
-Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",y);document.body.appendChild(this.exportDialog)}mxEvent.consume(x)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,f,g,x,y){this.isLocalFileSave()?this.saveLocalFile(g,d,x,y,f):this.saveRequest(d,f,mxUtils.bind(this,function(t,G){return this.createEchoRequest(g,t,x,y,f,G)}),g,y,x)};EditorUi.prototype.saveRequest=function(d,f,g,x,y,t,G){G=null!=G?G:!mxClient.IS_IOS||!navigator.standalone;
-var D=this.getServiceCount(!1);isLocalStorage&&D++;var I=4>=D?2:6<D?4:3;d=new CreateDialog(this,d,mxUtils.bind(this,function(H,S){if("_blank"==S||null!=H&&0<H.length){var T=g("_blank"==S?null:H,S==App.MODE_DEVICE||"download"==S||null==S||"_blank"==S?"0":"1");null!=T&&(S==App.MODE_DEVICE||"download"==S||"_blank"==S?T.simulate(document,"_blank"):this.pickFolder(S,mxUtils.bind(this,function(M){t=null!=t?t:"pdf"==f?"application/pdf":"image/"+f;if(null!=x)try{this.exportFile(x,H,t,!0,S,M)}catch(fa){this.handleError(fa)}else this.spinner.spin(document.body,
-mxResources.get("saving"))&&T.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=T.getStatus()&&299>=T.getStatus())try{this.exportFile(T.getText(),H,t,!0,S,M)}catch(fa){this.handleError(fa)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(fa){this.spinner.stop();this.handleError(fa)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,G,null,1<D,I,x,t,y);D=this.isServices(D)?4<D?390:280:160;this.showDialog(d.container,
-420,D,!0,!0);d.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,f,g,x,y,t){};EditorUi.prototype.pickFolder=function(d,f,g){f(null)};EditorUi.prototype.exportSvg=function(d,f,g,x,y,t,G,D,I,H,S,T,M,fa){if(this.spinner.spin(document.body,mxResources.get("export")))try{var la=this.editor.graph.isSelectionEmpty();g=null!=g?g:la;var ra=f?null:this.editor.graph.background;ra==
-mxConstants.NONE&&(ra=null);null==ra&&0==f&&(ra=S?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var ba=this.editor.graph.getSvg(ra,d,G,D,null,g,null,null,"blank"==H?"_blank":"self"==H?"_top":null,null,!M,S,T);x&&this.editor.graph.addSvgShadow(ba);var oa=this.getBaseFilename()+(y?".drawio":"")+".svg";fa=null!=fa?fa:mxUtils.bind(this,function(aa){this.isLocalFileSave()||aa.length<=MAX_REQUEST_SIZE?this.saveData(oa,"svg",aa,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},
-mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(aa)}))});var na=mxUtils.bind(this,function(aa){this.spinner.stop();y&&aa.setAttribute("content",this.getFileData(!0,null,null,null,g,I,null,null,null,!1));fa(Graph.xmlDeclaration+"\n"+(y?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(aa))});this.editor.graph.mathEnabled&&this.editor.addMathCss(ba);var N=mxUtils.bind(this,function(aa){t?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(aa,
-na,this.thumbImageCache)):na(aa)});M?this.embedFonts(ba,N):(this.editor.addFontCss(ba),N(ba))}catch(aa){this.handleError(aa)}};EditorUi.prototype.addRadiobox=function(d,f,g,x,y,t,G){return this.addCheckbox(d,g,x,y,t,G,!0,f)};EditorUi.prototype.addCheckbox=function(d,f,g,x,y,t,G,D){t=null!=t?t:!0;var I=document.createElement("input");I.style.marginRight="8px";I.style.marginTop="16px";I.setAttribute("type",G?"radio":"checkbox");G="geCheckbox-"+Editor.guid();I.id=G;null!=D&&I.setAttribute("name",D);
-g&&(I.setAttribute("checked","checked"),I.defaultChecked=!0);x&&I.setAttribute("disabled","disabled");t&&(d.appendChild(I),g=document.createElement("label"),mxUtils.write(g,f),g.setAttribute("for",G),d.appendChild(g),y||mxUtils.br(d));return I};EditorUi.prototype.addEditButton=function(d,f){var g=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);g.style.marginLeft="24px";var x=this.getCurrentFile(),y="";null!=x&&x.getMode()!=App.MODE_DEVICE&&x.getMode()!=App.MODE_BROWSER&&(y=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";x=document.createElement("option");x.setAttribute("value","blank");mxUtils.write(x,mxResources.get("makeCopy"));t.appendChild(x);x=document.createElement("option");x.setAttribute("value","custom");mxUtils.write(x,mxResources.get("custom")+"...");t.appendChild(x);d.appendChild(t);mxEvent.addListener(t,"change",mxUtils.bind(this,function(){if("custom"==
-t.value){var G=new FilenameDialog(this,y,mxResources.get("ok"),function(D){null!=D?y=D:t.value="blank"},mxResources.get("url"),null,null,null,null,function(){t.value="blank"});this.showDialog(G.container,300,80,!0,!1);G.init()}}));mxEvent.addListener(g,"change",mxUtils.bind(this,function(){g.checked&&(null==f||f.checked)?t.removeAttribute("disabled"):t.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return g.checked?"blank"===t.value?"_blank":y:null},getEditInput:function(){return g},
-getEditSelect:function(){return t}}};EditorUi.prototype.addLinkSection=function(d,f){function g(){var D=document.createElement("div");D.style.width="100%";D.style.height="100%";D.style.boxSizing="border-box";null!=t&&t!=mxConstants.NONE?(D.style.border="1px solid black",D.style.backgroundColor=t):(D.style.backgroundPosition="center center",D.style.backgroundRepeat="no-repeat",D.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");G.innerText="";G.appendChild(D)}mxUtils.write(d,mxResources.get("links")+
-":");var x=document.createElement("select");x.style.width="100px";x.style.padding="0px";x.style.marginLeft="8px";x.style.marginRight="10px";x.className="geBtn";var y=document.createElement("option");y.setAttribute("value","auto");mxUtils.write(y,mxResources.get("automatic"));x.appendChild(y);y=document.createElement("option");y.setAttribute("value","blank");mxUtils.write(y,mxResources.get("openInNewWindow"));x.appendChild(y);y=document.createElement("option");y.setAttribute("value","self");mxUtils.write(y,
-mxResources.get("openInThisWindow"));x.appendChild(y);f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),x.appendChild(f));d.appendChild(x);mxUtils.write(d,mxResources.get("borderColor")+":");var t="#0000ff",G=null;G=mxUtils.button("",mxUtils.bind(this,function(D){this.pickColor(t||"none",function(I){t=I;g()});mxEvent.consume(D)}));g();G.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";
-G.style.marginLeft="4px";G.style.height="22px";G.style.width="22px";G.style.position="relative";G.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";G.className="geColorBtn";d.appendChild(G);mxUtils.br(d);return{getColor:function(){return t},getTarget:function(){return x.value},focus:function(){x.focus()}}};EditorUi.prototype.createUrlParameters=function(d,f,g,x,y,t,G){G=null!=G?G:[];x&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||G.push("lightbox=1"),
-"auto"!=d&&G.push("target="+d),null!=f&&f!=mxConstants.NONE&&G.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=y&&0<y.length&&G.push("edit="+encodeURIComponent(y)),t&&G.push("layers=1"),this.editor.graph.foldingEnabled&&G.push("nav=1"));g&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&G.push("page-id="+this.currentPage.getId());return G};EditorUi.prototype.createLink=function(d,f,g,x,y,t,G,D,I,H){I=this.createUrlParameters(d,f,g,x,y,t,I);d=this.getCurrentFile();
-f=!0;null!=G?g="#U"+encodeURIComponent(G):(d=this.getCurrentFile(),D||null==d||d.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(g="#"+d.getHash(),f=!1));f&&null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&I.push("title="+encodeURIComponent(d.getTitle()));H&&1<g.length&&(I.push("open="+g.substring(1)),g="");return(x&&"1"!=urlParams.dev?EditorUi.lightboxHost:
-mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<I.length?"?"+I.join("&"):"")+g};EditorUi.prototype.createHtml=function(d,f,g,x,y,t,G,D,I,H,S,T){this.getBasenames();var M={};""!=y&&y!=mxConstants.NONE&&(M.highlight=y);"auto"!==x&&(M.target=x);H||(M.lightbox=!1);M.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||100==g||(M.zoom=g/100);g=[];G&&(g.push("pages"),M.resize=!0,null!=this.pages&&
-null!=this.currentPage&&(M.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(g.push("zoom"),M.resize=!0);D&&g.push("layers");I&&g.push("tags");0<g.length&&(H&&g.push("lightbox"),M.toolbar=g.join(" "));null!=S&&0<S.length&&(M.edit=S);null!=d?M.url=d:M.xml=this.getFileData(!0,null,null,null,null,!G);f='<div class="mxgraph" style="'+(t?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(M))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):
-"";T(f,'<script type="text/javascript" src="'+(0<d.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+d:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(d,f,g,x){var y=document.createElement("div");y.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";y.appendChild(t);var G=document.createElement("div");G.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var D=document.createElement("input");D.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";D.setAttribute("value","url");D.setAttribute("type","radio");D.setAttribute("name","type-embedhtmldialog");t=D.cloneNode(!0);t.setAttribute("value",
-"copy");G.appendChild(t);var I=document.createElement("span");mxUtils.write(I,mxResources.get("includeCopyOfMyDiagram"));G.appendChild(I);mxUtils.br(G);G.appendChild(D);I=document.createElement("span");mxUtils.write(I,mxResources.get("publicDiagramUrl"));G.appendChild(I);var H=this.getCurrentFile();null==g&&null!=H&&H.constructor==window.DriveFile&&(I=document.createElement("a"),I.style.paddingLeft="12px",I.style.color="gray",I.style.cursor="pointer",mxUtils.write(I,mxResources.get("share")),G.appendChild(I),
-mxEvent.addListener(I,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(H.getId())})));t.setAttribute("checked","checked");null==g&&D.setAttribute("disabled","disabled");y.appendChild(G);var S=this.addLinkSection(y),T=this.addCheckbox(y,mxResources.get("zoom"),!0,null,!0);mxUtils.write(y,":");var M=document.createElement("input");M.setAttribute("type","text");M.style.marginRight="16px";M.style.width="60px";M.style.marginLeft="4px";M.style.marginRight="12px";M.value=
-"100%";y.appendChild(M);var fa=this.addCheckbox(y,mxResources.get("fit"),!0);G=null!=this.pages&&1<this.pages.length;var la=la=this.addCheckbox(y,mxResources.get("allPages"),G,!G),ra=this.addCheckbox(y,mxResources.get("layers"),!0),ba=this.addCheckbox(y,mxResources.get("tags"),!0),oa=this.addCheckbox(y,mxResources.get("lightbox"),!0),na=null;G=380;if(EditorUi.enableHtmlEditOption){na=this.addEditButton(y,oa);var N=na.getEditInput();N.style.marginBottom="16px";G+=50;mxEvent.addListener(oa,"change",
-function(){oa.checked?N.removeAttribute("disabled"):N.setAttribute("disabled","disabled");N.checked&&oa.checked?na.getEditSelect().removeAttribute("disabled"):na.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,y,mxUtils.bind(this,function(){x(D.checked?g:null,T.checked,M.value,S.getTarget(),S.getColor(),fa.checked,la.checked,ra.checked,ba.checked,oa.checked,null!=na?na.getLink():null)}),null,d,f);this.showDialog(d.container,340,G,!0,!0);t.focus()};EditorUi.prototype.showPublishLinkDialog=
-function(d,f,g,x,y,t,G,D){var I=document.createElement("div");I.style.whiteSpace="nowrap";var H=document.createElement("h3");mxUtils.write(H,d||mxResources.get("link"));H.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";I.appendChild(H);var S=this.getCurrentFile();d=0;if(null==S||S.constructor!=window.DriveFile||f)G=null!=G?G:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{d=80;G=null!=G?G:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";
-H=document.createElement("div");H.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var T=document.createElement("div");T.style.whiteSpace="normal";mxUtils.write(T,mxResources.get("linkAccountRequired"));H.appendChild(T);T=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(S.getId())}));T.style.marginTop="12px";T.className="geBtn";H.appendChild(T);I.appendChild(H);T=document.createElement("a");
-T.style.paddingLeft="12px";T.style.color="gray";T.style.fontSize="11px";T.style.cursor="pointer";mxUtils.write(T,mxResources.get("check"));H.appendChild(T);mxEvent.addListener(T,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(V){this.spinner.stop();V=new ErrorDialog(this,null,mxResources.get(null!=V?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(V.container,
-300,80,!0,!1);V.init()}))}))}var M=null,fa=null;if(null!=g||null!=x)d+=30,mxUtils.write(I,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%",I.appendChild(M),mxUtils.write(I,mxResources.get("height")+":"),fa=document.createElement("input"),fa.setAttribute("type","text"),fa.style.width="50px",fa.style.marginLeft="6px",
-fa.style.marginBottom="10px",fa.value=x+"px",I.appendChild(fa),mxUtils.br(I);var la=this.addLinkSection(I,t);g=null!=this.pages&&1<this.pages.length;var ra=null;if(null==S||S.constructor!=window.DriveFile||f)ra=this.addCheckbox(I,mxResources.get("allPages"),g,!g);var ba=this.addCheckbox(I,mxResources.get("lightbox"),!0,null,null,!t),oa=this.addEditButton(I,ba),na=oa.getEditInput();t&&(na.style.marginLeft=ba.style.marginLeft,ba.style.display="none",d-=20);var N=this.addCheckbox(I,mxResources.get("layers"),
-!0);N.style.marginLeft=na.style.marginLeft;N.style.marginTop="8px";var aa=this.addCheckbox(I,mxResources.get("tags"),!0);aa.style.marginLeft=na.style.marginLeft;aa.style.marginBottom="16px";aa.style.marginTop="16px";mxEvent.addListener(ba,"change",function(){ba.checked?(N.removeAttribute("disabled"),na.removeAttribute("disabled")):(N.setAttribute("disabled","disabled"),na.setAttribute("disabled","disabled"));na.checked&&ba.checked?oa.getEditSelect().removeAttribute("disabled"):oa.getEditSelect().setAttribute("disabled",
-"disabled")});f=new CustomDialog(this,I,mxUtils.bind(this,function(){y(la.getTarget(),la.getColor(),null==ra?!0:ra.checked,ba.checked,oa.getLink(),N.checked,null!=M?M.value:null,null!=fa?fa.value:null,aa.checked)}),null,mxResources.get("create"),G,D);this.showDialog(f.container,340,300+d,!0,!0);null!=M?(M.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?M.select():document.execCommand("selectAll",!1,null)):la.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,f,g,x,y){var t=
-document.createElement("div");t.style.whiteSpace="nowrap";var G=document.createElement("h3");mxUtils.write(G,mxResources.get("image"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(y?"10":"4")+"px";t.appendChild(G);if(y){mxUtils.write(t,mxResources.get("zoom")+":");var D=document.createElement("input");D.setAttribute("type","text");D.style.marginRight="16px";D.style.width="60px";D.style.marginLeft="4px";D.style.marginRight="12px";D.value=this.lastExportZoom||"100%";
-t.appendChild(D);mxUtils.write(t,mxResources.get("borderWidth")+":");var I=document.createElement("input");I.setAttribute("type","text");I.style.marginRight="16px";I.style.width="60px";I.style.marginLeft="4px";I.value=this.lastExportBorder||"0";t.appendChild(I);mxUtils.br(t)}var H=this.addCheckbox(t,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),S=x?null:this.addCheckbox(t,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);G=this.editor.graph;var T=
-x?null:this.addCheckbox(t,mxResources.get("transparentBackground"),G.background==mxConstants.NONE||null==G.background);null!=T&&(T.style.marginBottom="16px");d=new CustomDialog(this,t,mxUtils.bind(this,function(){var M=parseInt(D.value)/100||1,fa=parseInt(I.value)||0;g(!H.checked,null!=S?S.checked:!1,null!=T?T.checked:!1,M,fa)}),null,d,f);this.showDialog(d.container,300,(y?25:0)+(x?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,f,g,x,y,t,G,D,I){G=null!=G?G:Editor.defaultIncludeDiagram;
-var H=document.createElement("div");H.style.whiteSpace="nowrap";var S=this.editor.graph,T="jpeg"==D?220:300,M=document.createElement("h3");mxUtils.write(M,d);M.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";H.appendChild(M);mxUtils.write(H,mxResources.get("zoom")+":");var fa=document.createElement("input");fa.setAttribute("type","text");fa.style.marginRight="16px";fa.style.width="60px";fa.style.marginLeft="4px";fa.style.marginRight="12px";fa.value=this.lastExportZoom||
-"100%";H.appendChild(fa);mxUtils.write(H,mxResources.get("borderWidth")+":");var la=document.createElement("input");la.setAttribute("type","text");la.style.marginRight="16px";la.style.width="60px";la.style.marginLeft="4px";la.value=this.lastExportBorder||"0";H.appendChild(la);mxUtils.br(H);var ra=this.addCheckbox(H,mxResources.get("selectionOnly"),!1,S.isSelectionEmpty()),ba=document.createElement("input");ba.style.marginTop="16px";ba.style.marginRight="8px";ba.style.marginLeft="24px";ba.setAttribute("disabled",
-"disabled");ba.setAttribute("type","checkbox");var oa=document.createElement("select");oa.style.marginTop="16px";oa.style.marginLeft="8px";d=["selectionOnly","diagram","page"];var na={};for(M=0;M<d.length;M++)if(!S.isSelectionEmpty()||"selectionOnly"!=d[M]){var N=document.createElement("option");mxUtils.write(N,mxResources.get(d[M]));N.setAttribute("value",d[M]);oa.appendChild(N);na[d[M]]=N}I?(mxUtils.write(H,mxResources.get("size")+":"),H.appendChild(oa),mxUtils.br(H),T+=26,mxEvent.addListener(oa,
-"change",function(){"selectionOnly"==oa.value&&(ra.checked=!0)})):t&&(H.appendChild(ba),mxUtils.write(H,mxResources.get("crop")),mxUtils.br(H),T+=30,mxEvent.addListener(ra,"change",function(){ra.checked?ba.removeAttribute("disabled"):ba.setAttribute("disabled","disabled")}));S.isSelectionEmpty()?I&&(ra.style.display="none",ra.nextSibling.style.display="none",ra.nextSibling.nextSibling.style.display="none",T-=30):(oa.value="diagram",ba.setAttribute("checked","checked"),ba.defaultChecked=!0,mxEvent.addListener(ra,
-"change",function(){oa.value=ra.checked?"selectionOnly":"diagram"}));var aa=this.addCheckbox(H,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=D),V=null;Editor.isDarkMode()&&(V=this.addCheckbox(H,mxResources.get("dark"),!0),T+=26);var ha=this.addCheckbox(H,mxResources.get("shadow"),S.shadowVisible),X=null;if("png"==D||"jpeg"==D)X=this.addCheckbox(H,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),T+=30;var ia=this.addCheckbox(H,mxResources.get("includeCopyOfMyDiagram"),
-G,null,null,"jpeg"!=D);ia.style.marginBottom="16px";var q=document.createElement("input");q.style.marginBottom="16px";q.style.marginRight="8px";q.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||q.setAttribute("disabled","disabled");var E=document.createElement("select");E.style.maxWidth="260px";E.style.marginLeft="8px";E.style.marginRight="10px";E.style.marginBottom="16px";E.className="geBtn";t=document.createElement("option");t.setAttribute("value","none");mxUtils.write(t,
-mxResources.get("noChange"));E.appendChild(t);t=document.createElement("option");t.setAttribute("value","embedFonts");mxUtils.write(t,mxResources.get("embedFonts"));E.appendChild(t);t=document.createElement("option");t.setAttribute("value","lblToSvg");mxUtils.write(t,mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||E.appendChild(t);mxEvent.addListener(E,"change",mxUtils.bind(this,function(){"lblToSvg"==E.value?(q.checked=!0,q.setAttribute("disabled","disabled"),na.page.style.display=
-"none","page"==oa.value&&(oa.value="diagram"),ha.checked=!1,ha.setAttribute("disabled","disabled"),Y.style.display="inline-block",Q.style.display="none"):"disabled"==q.getAttribute("disabled")&&(q.checked=!1,q.removeAttribute("disabled"),ha.removeAttribute("disabled"),na.page.style.display="",Y.style.display="none",Q.style.display="")}));f&&(H.appendChild(q),mxUtils.write(H,mxResources.get("embedImages")),mxUtils.br(H),mxUtils.write(H,mxResources.get("txtSettings")+":"),H.appendChild(E),mxUtils.br(H),
-T+=60);var Q=document.createElement("select");Q.style.maxWidth="260px";Q.style.marginLeft="8px";Q.style.marginRight="10px";Q.className="geBtn";f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));Q.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));Q.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));
-Q.appendChild(f);var Y=document.createElement("div");mxUtils.write(Y,mxResources.get("LinksLost"));Y.style.margin="7px";Y.style.display="none";"svg"==D&&(mxUtils.write(H,mxResources.get("links")+":"),H.appendChild(Q),H.appendChild(Y),mxUtils.br(H),mxUtils.br(H),T+=50);g=new CustomDialog(this,H,mxUtils.bind(this,function(){this.lastExportBorder=la.value;this.lastExportZoom=fa.value;y(fa.value,aa.checked,!ra.checked,ha.checked,ia.checked,q.checked,la.value,ba.checked,!1,Q.value,null!=X?X.checked:null,
-null!=V?V.checked:null,oa.value,"embedFonts"==E.value,"lblToSvg"==E.value)}),null,g,x);this.showDialog(g.container,340,T,!0,!0,null,null,null,null,!0);fa.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?fa.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,f,g,x,y){var t=document.createElement("div");t.style.whiteSpace="nowrap";var G=this.editor.graph;if(null!=f){var D=document.createElement("h3");mxUtils.write(D,f);D.style.cssText=
-"width:100%;text-align:center;margin-top:0px;margin-bottom:4px";t.appendChild(D)}var I=this.addCheckbox(t,mxResources.get("fit"),!0),H=this.addCheckbox(t,mxResources.get("shadow"),G.shadowVisible&&x,!x),S=this.addCheckbox(t,g),T=this.addCheckbox(t,mxResources.get("lightbox"),!0),M=this.addEditButton(t,T),fa=M.getEditInput(),la=1<G.model.getChildCount(G.model.getRoot()),ra=this.addCheckbox(t,mxResources.get("layers"),la,!la);ra.style.marginLeft=fa.style.marginLeft;ra.style.marginBottom="12px";ra.style.marginTop=
-"8px";mxEvent.addListener(T,"change",function(){T.checked?(la&&ra.removeAttribute("disabled"),fa.removeAttribute("disabled")):(ra.setAttribute("disabled","disabled"),fa.setAttribute("disabled","disabled"));fa.checked&&T.checked?M.getEditSelect().removeAttribute("disabled"):M.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,t,mxUtils.bind(this,function(){d(I.checked,H.checked,S.checked,T.checked,M.getLink(),ra.checked)}),null,mxResources.get("embed"),y);this.showDialog(f.container,
-280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,f,g,x,y,t,G,D){function I(fa){var la=" ",ra="";x&&(la=" 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:"")+(y?"&edit=_blank":
-"")+(t?"&layers=1":"")+"');}})(this);\"",ra+="cursor:pointer;");d&&(ra+="max-width:100%;");var ba="";g&&(ba=' width="'+Math.round(H.width)+'" height="'+Math.round(H.height)+'"');G('<img src="'+fa+'"'+ba+(""!=ra?' style="'+ra+'"':"")+la+"/>")}var H=this.editor.graph.getGraphBounds(),S=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(fa){var la=x?this.getFileData(!0):null;fa=this.createImageDataUri(fa,la,"png");I(fa)}),null,null,null,mxUtils.bind(this,
-function(fa){D({message:mxResources.get("unknownError")})}),null,!0,g?2:1,null,f,null,null,Editor.defaultBorder);else if(f=this.getFileData(!0),H.width*H.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var T="";g&&(T="&w="+Math.round(2*H.width)+"&h="+Math.round(2*H.height));var M=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(x?"1":"0")+T+"&xml="+encodeURIComponent(f));M.send(mxUtils.bind(this,function(){200<=M.getStatus()&&299>=M.getStatus()?I("data:image/png;base64,"+M.getText()):D({message:mxResources.get("unknownError")})}))}else D({message:mxResources.get("drawingTooLarge")})};
-EditorUi.prototype.createEmbedSvg=function(d,f,g,x,y,t,G){var D=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g),I=D.getElementsByTagName("a");if(null!=I)for(var H=0;H<I.length;H++){var S=I[H].getAttribute("href");null!=S&&"#"==S.charAt(0)&&"_blank"==I[H].getAttribute("target")&&I[H].removeAttribute("target")}x&&D.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(D);if(g){var T=" ",M="";x&&(T="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(y?"&edit=_blank":"")+(t?"&layers=1":"")+"');}})(this);\"",M+="cursor:pointer;");d&&(M+="max-width:100%;");this.editor.convertImages(D,mxUtils.bind(this,function(fa){G('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(fa))+'"'+(""!=M?' style="'+M+'"':"")+T+"/>")}))}else M="",x&&(f=this.getSelectedPageIndex(),D.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(y?"&edit=_blank":"")+(t?"&layers=1":"")+"');}}})(this);"),M+="cursor:pointer;"),d&&(d=parseInt(D.getAttribute("width")),y=parseInt(D.getAttribute("height")),D.setAttribute("viewBox","-0.5 -0.5 "+d+" "+y),M+="max-width:100%;max-height:"+y+"px;",D.removeAttribute("height")),""!=M&&D.setAttribute("style",M),this.editor.addFontCss(D),this.editor.graph.mathEnabled&&this.editor.addMathCss(D),G(mxUtils.getXml(D))};EditorUi.prototype.timeSince=function(d){d=
-Math.floor((new Date-d)/1E3);var f=Math.floor(d/31536E3);if(1<f)return f+" "+mxResources.get("years");f=Math.floor(d/2592E3);if(1<f)return f+" "+mxResources.get("months");f=Math.floor(d/86400);if(1<f)return f+" "+mxResources.get("days");f=Math.floor(d/3600);if(1<f)return f+" "+mxResources.get("hours");f=Math.floor(d/60);return 1<f?f+" "+mxResources.get("minutes"):1==f?f+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(d,f){if(null!=d){var g=null;if("diagram"==d.nodeName)g=
-d;else if("mxfile"==d.nodeName){var x=d.getElementsByTagName("diagram");if(0<x.length){g=x[0];var y=f.getGlobalVariable;f.getGlobalVariable=function(t){return"page"==t?g.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==t?1:y.apply(this,arguments)}}}null!=g&&(d=Editor.parseDiagramNode(g))}x=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(d)}catch(t){}finally{this.editor.graph=x}return d};EditorUi.prototype.getPngFileProperties=function(d){var f=1,g=0;if(null!=
-d){if(d.hasAttribute("scale")){var x=parseFloat(d.getAttribute("scale"));!isNaN(x)&&0<x&&(f=x)}d.hasAttribute("border")&&(x=parseInt(d.getAttribute("border")),!isNaN(x)&&0<x&&(g=x))}return{scale:f,border:g}};EditorUi.prototype.getEmbeddedPng=function(d,f,g,x,y){try{var t=this.editor.graph,G=null!=t.themes&&"darkTheme"==t.defaultThemeName,D=null;if(null!=g&&0<g.length)t=this.createTemporaryGraph(G?t.getDefaultStylesheet():t.getStylesheet()),document.body.appendChild(t.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement,
-!0),t),D=g;else if(G||null!=this.pages&&this.currentPage!=this.pages[0]){t=this.createTemporaryGraph(G?t.getDefaultStylesheet():t.getStylesheet());var I=t.getGlobalVariable;t.setBackgroundImage=this.editor.graph.setBackgroundImage;var H=this.pages[0];this.currentPage==H?t.setBackgroundImage(this.editor.graph.backgroundImage):null!=H.viewState&&null!=H.viewState&&t.setBackgroundImage(H.viewState.backgroundImage);t.getGlobalVariable=function(S){return"page"==S?H.getName():"pagenumber"==S?1:I.apply(this,
-arguments)};document.body.appendChild(t.container);t.model.setRoot(H.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(S){try{null==D&&(D=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var T=S.toDataURL("image/png");T=Editor.writeGraphModelToPng(T,"tEXt","mxfile",encodeURIComponent(D));d(T.substring(T.lastIndexOf(",")+1));t!=this.editor.graph&&t.container.parentNode.removeChild(t.container)}catch(M){null!=f&&f(M)}}),null,null,null,mxUtils.bind(this,function(S){null!=f&&
-f(S)}),null,null,x,null,t.shadowVisible,null,t,y,null,null,null,"diagram",null)}catch(S){null!=f&&f(S)}};EditorUi.prototype.getEmbeddedSvg=function(d,f,g,x,y,t,G,D,I,H,S,T,M){D=null!=D?D:!0;S=null!=S?S:0;G=null!=I?I:f.background;G==mxConstants.NONE&&(G=null);t=f.getSvg(G,H,S,null,null,t,null,null,null,f.shadowVisible||T,null,M,"diagram");(f.shadowVisible||T)&&f.addSvgShadow(t,null,null,0==S);null!=d&&t.setAttribute("content",d);null!=g&&t.setAttribute("resource",g);var fa=mxUtils.bind(this,function(la){la=
-(x?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(la);null!=y&&y(la);return la});f.mathEnabled&&this.editor.addMathCss(t);if(null!=y)this.embedFonts(t,mxUtils.bind(this,function(la){D?this.editor.convertImages(la,mxUtils.bind(this,function(ra){fa(ra)})):fa(la)}));else return fa(t)};EditorUi.prototype.embedFonts=function(d,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,this.editor.resolvedFontCss),
-this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(d,g),f(d)}catch(x){f(d)}}))}catch(g){f(d)}}))};EditorUi.prototype.exportImage=function(d,f,g,x,y,t,G,D,I,H,S,T,M){I=null!=I?I:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var fa=this.editor.graph.isSelectionEmpty();g=null!=g?g:fa;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(la){this.spinner.stop();try{this.saveCanvas(la,
-y?this.getFileData(!0,null,null,null,g,D):null,I,null==this.pages||0==this.pages.length,S)}catch(ra){this.handleError(ra)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(la){this.spinner.stop();this.handleError(la)}),null,g,d||1,f,x,null,null,t,G,H,T,M)}catch(la){this.spinner.stop(),this.handleError(la)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.importXml=function(d,f,g,x,y,t,G){f=null!=f?f:0;g=null!=g?g:0;var D=
-[];try{var I=this.editor.graph;if(null!=d&&0<d.length){I.model.beginUpdate();try{var H=mxUtils.parseXml(d);d={};var S=this.editor.extractGraphModel(H.documentElement,null!=this.pages);if(null!=S&&"mxfile"==S.nodeName&&null!=this.pages){var T=S.getElementsByTagName("diagram");if(1==T.length&&!t){if(S=Editor.parseDiagramNode(T[0]),null!=this.currentPage&&(d[T[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var M=T[0].getAttribute("name");null!=M&&""!=M&&this.editor.graph.model.execute(new RenamePage(this,
-this.currentPage,M))}}else if(0<T.length){t=[];var fa=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[T[0].getAttribute("id")]=this.pages[0].getId(),S=Editor.parseDiagramNode(T[0]),x=!1,fa=1);for(;fa<T.length;fa++){var la=T[fa].getAttribute("id");T[fa].removeAttribute("id");var ra=this.updatePageRoot(new DiagramPage(T[fa]));d[la]=T[fa].getAttribute("id");var ba=this.pages.length;null==ra.getName()&&ra.setName(mxResources.get("pageWithNumber",[ba+1]));I.model.execute(new ChangePage(this,
-ra,ra,ba,!0));t.push(ra)}this.updatePageLinks(d,t)}}if(null!=S&&"mxGraphModel"===S.nodeName){D=I.importGraphModel(S,f,g,x);if(null!=D)for(fa=0;fa<D.length;fa++)this.updatePageLinksForCell(d,D[fa]);var oa=I.parseBackgroundImage(S.getAttribute("backgroundImage"));if(null!=oa&&null!=oa.originalSrc){this.updateBackgroundPageLink(d,oa);var na=new ChangePageSetup(this,null,oa);na.ignoreColor=!0;I.model.execute(na)}}G&&this.insertHandler(D,null,null,I.defaultVertexStyle,I.defaultEdgeStyle,!1,!0)}finally{I.model.endUpdate()}}}catch(N){if(y)throw N;
-this.handleError(N)}return D};EditorUi.prototype.updatePageLinks=function(d,f){for(var g=0;g<f.length;g++)this.updatePageLinksForCell(d,f[g].root),null!=f[g].viewState&&this.updateBackgroundPageLink(d,f[g].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var g=d[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=g&&(f.originalSrc="data:page/id,"+g)}}catch(x){}};EditorUi.prototype.updatePageLinksForCell=
-function(d,f){var g=document.createElement("div"),x=this.editor.graph,y=x.getLinkForCell(f);null!=y&&x.setLinkForCell(f,this.updatePageLink(d,y));if(x.isHtmlLabel(f)){g.innerHTML=x.sanitizeHtml(x.getLabel(f));for(var t=g.getElementsByTagName("a"),G=!1,D=0;D<t.length;D++)y=t[D].getAttribute("href"),null!=y&&(t[D].setAttribute("href",this.updatePageLink(d,y)),G=!0);G&&x.labelChanged(f,g.innerHTML)}for(D=0;D<x.model.getChildCount(f);D++)this.updatePageLinksForCell(d,x.model.getChildAt(f,D))};EditorUi.prototype.updatePageLink=
-function(d,f){if(Graph.isPageLink(f)){var g=d[f.substring(f.indexOf(",")+1)];f=null!=g?"data:page/id,"+g:null}else if("data:action/json,"==f.substring(0,17))try{var x=JSON.parse(f.substring(17));if(null!=x.actions){for(var y=0;y<x.actions.length;y++){var t=x.actions[y];if(null!=t.open&&Graph.isPageLink(t.open)){var G=t.open.substring(t.open.indexOf(",")+1);g=d[G];null!=g?t.open="data:page/id,"+g:null==this.getPageById(G)&&delete t.open}}f="data:action/json,"+JSON.stringify(x)}}catch(D){}return f};
-EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,f,g,x,y){x=null!=x?x:d.name;g=null!=g?g:mxUtils.bind(this,function(G){this.handleError(G)});var t=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var G=this.isRemoteVisioFormat(x);try{var D="UNKNOWN-VISIO",I=x.lastIndexOf(".");if(0<=I&&I<x.length)D=x.substring(I+1).toUpperCase();else{var H=x.lastIndexOf("/");0<=
-H&&H<x.length&&(x=x.substring(H+1))}EditorUi.logEvent({category:D+"-MS-IMPORT-FILE",action:"filename_"+x,label:G?"remote":"local"})}catch(T){}if(G)if(null==VSD_CONVERT_URL||this.isOffline())g({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{G=new FormData;G.append("file1",d,x);var S=new XMLHttpRequest;S.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(x)?"?stencil=1":""));S.responseType="blob";this.addRemoteServiceSecurityCheck(S);
-null!=y&&S.setRequestHeader("x-convert-custom",y);S.onreadystatechange=mxUtils.bind(this,function(){if(4==S.readyState)if(200<=S.status&&299>=S.status)try{var T=S.response;if("text/xml"==T.type){var M=new FileReader;M.onload=mxUtils.bind(this,function(fa){try{f(fa.target.result)}catch(la){g({message:mxResources.get("errorLoadingFile")})}});M.readAsText(T)}else this.doImportVisio(T,f,g,x)}catch(fa){g(fa)}else try{""==S.responseType||"text"==S.responseType?g({message:S.responseText}):(M=new FileReader,
-M.onload=function(){g({message:JSON.parse(M.result).Message})},M.readAsText(S.response))}catch(fa){g({})}});S.send(G)}else try{this.doImportVisio(d,f,g,x)}catch(T){g(T)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?t():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",t))};EditorUi.prototype.importGraphML=function(d,f,g){g=null!=g?g:mxUtils.bind(this,function(y){this.handleError(y)});
-var x=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(d,f,g)}catch(y){g(y)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?x():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",x))};EditorUi.prototype.exportVisio=function(d){var f=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(d)||
-this.handleError({message:mxResources.get("unknownError")})}catch(g){this.handleError(g)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.convertLucidChart=function(d,f,g){var x=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var y=
-JSON.parse(d);f(LucidImporter.importState(y));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+d.length}),null!=window.console&&"1"==urlParams.test){var t=[(new Date).toISOString(),"convertLucidChart",y];null!=y.state&&t.push(JSON.parse(y.state));if(null!=y.svgThumbs)for(var G=0;G<y.svgThumbs.length;G++)t.push(Editor.createSvgDataUri(y.svgThumbs[G]));null!=y.thumb&&t.push(y.thumb);console.log.apply(console,t)}}catch(D){}}catch(D){null!=window.console&&console.error(D),g(D)}else g({message:mxResources.get("serviceUnavailableOrBlocked")})});
-"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(x,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",x)})})})}):mxscript("js/extensions.min.js",x))};EditorUi.prototype.generateMermaidImage=function(d,
-f,g,x){var y=this,t=function(){try{this.loadingMermaid=!1,f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig),f.securityLevel="strict",f.startOnLoad=!1,Editor.isDarkMode()&&(f.theme="dark"),mermaid.mermaidAPI.initialize(f),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),d,function(G){try{if(mxClient.IS_IE||mxClient.IS_IE11)G=G.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var D=mxUtils.parseXml(G).getElementsByTagName("svg");
-if(0<D.length){var I=parseFloat(D[0].getAttribute("width")),H=parseFloat(D[0].getAttribute("height"));if(isNaN(I)||isNaN(H))try{var S=D[0].getAttribute("viewBox").split(/\s+/);I=parseFloat(S[2]);H=parseFloat(S[3])}catch(T){I=I||100,H=H||100}g(y.convertDataUri(Editor.createSvgDataUri(G)),I,H)}else x({message:mxResources.get("invalidInput")})}catch(T){x(T)}})}catch(G){x(G)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?t():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",
-t):mxscript("js/extensions.min.js",t))};EditorUi.prototype.generatePlantUmlImage=function(d,f,g,x){function y(D,I,H){c1=D>>2;c2=(D&3)<<4|I>>4;c3=(I&15)<<2|H>>6;c4=H&63;r="";r+=t(c1&63);r+=t(c2&63);r+=t(c3&63);return r+=t(c4&63)}function t(D){if(10>D)return String.fromCharCode(48+D);D-=10;if(26>D)return String.fromCharCode(65+D);D-=26;if(26>D)return String.fromCharCode(97+D);D-=26;return 0==D?"-":1==D?"_":"?"}var G=new XMLHttpRequest;G.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":
-PLANT_URL+"/svg/")+function(D){r="";for(i=0;i<D.length;i+=3)r=i+2==D.length?r+y(D.charCodeAt(i),D.charCodeAt(i+1),0):i+1==D.length?r+y(D.charCodeAt(i),0,0):r+y(D.charCodeAt(i),D.charCodeAt(i+1),D.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=f&&(G.responseType="blob");G.onload=function(D){if(200<=this.status&&300>this.status)if("txt"==f)g(this.response);else{var I=new FileReader;I.readAsDataURL(this.response);I.onloadend=function(H){var S=new Image;S.onload=
-function(){try{var T=S.width,M=S.height;if(0==T&&0==M){var fa=I.result,la=fa.indexOf(","),ra=decodeURIComponent(escape(atob(fa.substring(la+1)))),ba=mxUtils.parseXml(ra).getElementsByTagName("svg");0<ba.length&&(T=parseFloat(ba[0].getAttribute("width")),M=parseFloat(ba[0].getAttribute("height")))}g(I.result,T,M)}catch(oa){x(oa)}};S.src=I.result};I.onerror=function(H){x(H)}}else x(D)};G.onerror=function(D){x(D)};G.send()};EditorUi.prototype.insertAsPreText=function(d,f,g){var x=this.editor.graph,y=
-null;x.getModel().beginUpdate();try{y=x.insertVertex(null,null,"<pre>"+d+"</pre>",f,g,1,1,"text;html=1;align=left;verticalAlign=top;"),x.updateCellSize(y,!0)}finally{x.getModel().endUpdate()}return y};EditorUi.prototype.insertTextAt=function(d,f,g,x,y,t,G,D){t=null!=t?t:!0;G=null!=G?G:!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(M){4==M.readyState&&200<=M.status&&299>=M.status&&this.editor.graph.setSelectionCells(this.insertTextAt(M.responseText,f,g,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(y||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var I=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var H=Editor.extractGraphModelFromPdf(d);if(null!=H&&0<H.length)return this.importXml(H,f,g,t,!0,D)}if(Editor.isPngDataUrl(d)&&(H=Editor.extractGraphModelFromPng(d),
-null!=H&&0<H.length))return this.importXml(H,f,g,t,!0,D);if("data:image/svg+xml;"==d.substring(0,19))try{H=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(H=d.substring(d.indexOf(",")+1),H=window.atob&&!mxClient.IS_SF?atob(H):Base64.decode(H,!0)):H=decodeURIComponent(d.substring(d.indexOf(",")+1));var S=this.importXml(H,f,g,t,!0,D);if(0<S.length)return S}catch(M){}this.loadImage(d,mxUtils.bind(this,function(M){if("data:"==d.substring(0,5))this.resizeImage(M,d,mxUtils.bind(this,function(ra,ba,
-oa){I.setSelectionCell(I.insertVertex(null,null,"",I.snap(f),I.snap(g),ba,oa,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(ra)+";"))}),G,this.maxImageSize);else{var fa=Math.min(1,Math.min(this.maxImageSize/M.width,this.maxImageSize/M.height)),la=Math.round(M.width*fa);M=Math.round(M.height*fa);I.setSelectionCell(I.insertVertex(null,null,"",I.snap(f),I.snap(g),la,M,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-d+";"))}}),mxUtils.bind(this,function(){var M=null;I.getModel().beginUpdate();try{M=I.insertVertex(I.getDefaultParent(),null,d,I.snap(f),I.snap(g),1,1,"text;"+(x?"html=1;":"")),I.updateCellSize(M),I.fireEvent(new mxEventObject("textInserted","cells",[M]))}finally{I.getModel().endUpdate()}I.setSelectionCell(M)}))}else{d=Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,f,g,t,null,D);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,
-function(M){this.editor.graph.setSelectionCells(this.importXml(M,f,g,t,null,D))}),mxUtils.bind(this,function(M){this.handleError(M)}));else{I=this.editor.graph;y=null;I.getModel().beginUpdate();try{y=I.insertVertex(I.getDefaultParent(),null,"",I.snap(f),I.snap(g),1,1,"text;whiteSpace=wrap;"+(x?"html=1;":""));I.fireEvent(new mxEventObject("textInserted","cells",[y]));"<"==d.charAt(0)&&d.indexOf(">")==d.length-1&&(d=mxUtils.htmlEntities(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+
-"...");y.value=d;I.updateCellSize(y);if(0<this.maxTextWidth&&y.geometry.width>this.maxTextWidth){var T=I.getPreferredSizeForCell(y,this.maxTextWidth);y.geometry.width=T.width;y.geometry.height=T.height}Graph.isLink(y.value)&&I.setLinkForCell(y,y.value);y.geometry.width+=I.gridSize;y.geometry.height+=I.gridSize}finally{I.getModel().endUpdate()}return[y]}}return[]};EditorUi.prototype.formatFileSize=function(d){var f=-1;do d/=1024,f++;while(1024<d);return Math.max(d,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]};
-EditorUi.prototype.convertDataUri=function(d){if("data:"==d.substring(0,5)){var f=d.indexOf(";");0<f&&(d=d.substring(0,f)+d.substring(d.indexOf(",",f+1)))}return d};EditorUi.prototype.isRemoteFileFormat=function(d,f){return/("contentType":\s*"application\/gliffy\+json")/.test(d)};EditorUi.prototype.isLucidChartData=function(d){return null!=d&&('{"state":"{\\"Properties\\":'==d.substring(0,26)||'{"Properties":'==d.substring(0,14))};EditorUi.prototype.importLocalFile=function(d,f){if(d&&Graph.fileSupport){if(null==
-this.importFileInputElt){var g=document.createElement("input");g.setAttribute("type","file");mxEvent.addListener(g,"change",mxUtils.bind(this,function(){null!=g.files&&(this.importFiles(g.files,null,null,this.maxImageSize),g.type="",g.type="file",g.value="")}));g.style.display="none";document.body.appendChild(g);this.importFileInputElt=g}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(G,D){StorageFile.listFiles(this,
-"F",G,D)});window.openBrowserFile=mxUtils.bind(this,function(G,D,I){StorageFile.getFileContent(this,G,D,I)});window.deleteBrowserFile=mxUtils.bind(this,function(G,D,I){StorageFile.deleteFile(this,G,D,I)});if(!f){var x=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=new OpenFile(mxUtils.bind(this,function(G){this.hideDialog(G)}));window.openFile.setConsumer(mxUtils.bind(this,function(G,D){null!=D&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(D)?(G=new Blob([G],{type:"application/octet-stream"}),
-this.importVisio(G,mxUtils.bind(this,function(I){this.importXml(I,0,0,!0)}),null,D)):this.editor.graph.setSelectionCells(this.importXml(G,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!f){var y=this.dialog,t=y.close;this.dialog.close=mxUtils.bind(this,function(G){Editor.useLocalStorage=x;t.apply(y,arguments);G&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};
-EditorUi.prototype.importZipFile=function(d,f,g){var x=this,y=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(t){if(mxUtils.isEmptyObject(t.files))g();else{var G=0,D,I=!1;t.forEach(function(H,S){H=S.name.toLowerCase();"diagram/diagram.xml"==H?(I=!0,S.async("string").then(function(T){0==T.indexOf("<mxfile ")?f(T):g()})):0==H.indexOf("versions/")&&(H=parseInt(H.substr(9)),H>G&&(G=H,D=S))});0<G?D.async("string").then(function(H){(new XMLHttpRequest).upload&&
-x.isRemoteFileFormat(H,d.name)?x.isOffline()?x.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):x.parseFileData(H,mxUtils.bind(this,function(S){4==S.readyState&&(200<=S.status&&299>=S.status?f(S.responseText):g())}),d.name):g()}):I||g()}},function(t){g(t)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?y():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",y))};EditorUi.prototype.importFile=function(d,f,g,x,y,t,G,D,I,H,S,T){H=null!=
-H?H:!0;var M=!1,fa=null,la=mxUtils.bind(this,function(ra){var ba=null;null!=ra&&"<mxlibrary"==ra.substring(0,10)?this.loadLibrary(new LocalLibrary(this,ra,G)):ba=this.importXml(ra,g,x,H,null,null!=T?mxEvent.isControlDown(T):null);null!=D&&D(ba)});"image"==f.substring(0,5)?(I=!1,"image/png"==f.substring(0,9)&&(f=S?null:this.extractGraphModelFromPng(d),null!=f&&0<f.length&&(fa=this.importXml(f,g,x,H,null,null!=T?mxEvent.isControlDown(T):null),I=!0)),I||(f=this.editor.graph,I=d.indexOf(";"),0<I&&(d=
-d.substring(0,I)+d.substring(d.indexOf(",",I+1))),H&&f.isGridEnabled()&&(g=f.snap(g),x=f.snap(x)),fa=[f.insertVertex(null,null,"",g,x,y,t,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+d+";")])):/(\.*<graphml )/.test(d)?(M=!0,this.importGraphML(d,la)):null!=I&&null!=G&&(/(\.v(dx|sdx?))($|\?)/i.test(G)||/(\.vs(x|sx?))($|\?)/i.test(G))?(M=!0,this.importVisio(I,la)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,G)?
-this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(M=!0,y=mxUtils.bind(this,function(ra){4==ra.readyState&&(200<=ra.status&&299>=ra.status?la(ra.responseText):null!=D&&D(null))}),null!=d?this.parseFileData(d,y,G):this.parseFile(I,y,G)):0==d.indexOf("PK")&&null!=I?(M=!0,this.importZipFile(I,la,mxUtils.bind(this,function(){fa=this.insertTextAt(this.validateFileData(d),g,x,!0,null,H);D(fa)}))):/(\.v(sd|dx))($|\?)/i.test(G)||/(\.vs(s|x))($|\?)/i.test(G)||(fa=this.insertTextAt(this.validateFileData(d),
-g,x,!0,null,H,null,null!=T?mxEvent.isControlDown(T):null));M||null==D||D(fa);return fa};EditorUi.prototype.importFiles=function(d,f,g,x,y,t,G,D,I,H,S,T,M){x=null!=x?x:this.maxImageSize;H=null!=H?H:this.maxImageBytes;var fa=null!=f&&null!=g,la=!0;f=null!=f?f:0;g=null!=g?g:0;var ra=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var ba=S||this.resampleThreshold,oa=0;oa<d.length;oa++)if("image/svg"!==d[oa].type.substring(0,9)&&"image/"===d[oa].type.substring(0,6)&&d[oa].size>ba){ra=!0;break}var na=mxUtils.bind(this,
-function(){var N=this.editor.graph,aa=N.gridSize;y=null!=y?y:mxUtils.bind(this,function(E,Q,Y,R,Z,da,qa,va,ja){try{return null!=E&&"<mxlibrary"==E.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,E,qa)),null):this.isCompatibleString(E)&&1==d.length&&this.isBlankFile()&&!this.canUndo()?(this.spinner.stop(),this.fileLoaded(new LocalFile(this,E,qa,!0)),null):this.importFile(E,Q,Y,R,Z,da,qa,va,ja,fa,T,M)}catch(sa){return this.handleError(sa),null}});t=null!=t?t:mxUtils.bind(this,
-function(E){N.setSelectionCells(E)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var V=d.length,ha=V,X=[],ia=mxUtils.bind(this,function(E,Q){X[E]=Q;if(0==--ha){this.spinner.stop();if(null!=D)D(X);else{var Y=[];N.getModel().beginUpdate();try{for(E=0;E<X.length;E++){var R=X[E]();null!=R&&(Y=Y.concat(R))}}finally{N.getModel().endUpdate()}}t(Y)}}),q=0;q<V;q++)mxUtils.bind(this,function(E){var Q=d[E];if(null!=Q){var Y=new FileReader;Y.onload=mxUtils.bind(this,function(R){if(null==
-G||G(Q))if("image/"==Q.type.substring(0,6))if("image/svg"==Q.type.substring(0,9)){var Z=Graph.clipSvgDataUri(R.target.result),da=Z.indexOf(",");da=decodeURIComponent(escape(atob(Z.substring(da+1))));var qa=mxUtils.parseXml(da);da=qa.getElementsByTagName("svg");if(0<da.length){da=da[0];var va=T?null:da.getAttribute("content");null!=va&&"<"!=va.charAt(0)&&"%"!=va.charAt(0)&&(va=unescape(window.atob?atob(va):Base64.decode(va,!0)));null!=va&&"%"==va.charAt(0)&&(va=decodeURIComponent(va));null==va||"<mxfile "!==
-va.substring(0,8)&&"<mxGraphModel "!==va.substring(0,14)?ia(E,mxUtils.bind(this,function(){try{if(null!=qa){var ya=qa.getElementsByTagName("svg");if(0<ya.length){var Aa=ya[0],Ea=Aa.getAttribute("width"),za=Aa.getAttribute("height");Ea=null!=Ea&&"%"!=Ea.charAt(Ea.length-1)?parseFloat(Ea):NaN;za=null!=za&&"%"!=za.charAt(za.length-1)?parseFloat(za):NaN;var Ia=Aa.getAttribute("viewBox");if(null==Ia||0==Ia.length)Aa.setAttribute("viewBox","0 0 "+Ea+" "+za);else if(isNaN(Ea)||isNaN(za)){var Ca=Ia.split(" ");
-3<Ca.length&&(Ea=parseFloat(Ca[2]),za=parseFloat(Ca[3]))}Z=Editor.createSvgDataUri(mxUtils.getXml(Aa));var Sa=Math.min(1,Math.min(x/Math.max(1,Ea)),x/Math.max(1,za)),Pa=y(Z,Q.type,f+E*aa,g+E*aa,Math.max(1,Math.round(Ea*Sa)),Math.max(1,Math.round(za*Sa)),Q.name);if(isNaN(Ea)||isNaN(za)){var Ta=new Image;Ta.onload=mxUtils.bind(this,function(){Ea=Math.max(1,Ta.width);za=Math.max(1,Ta.height);Pa[0].geometry.width=Ea;Pa[0].geometry.height=za;Aa.setAttribute("viewBox","0 0 "+Ea+" "+za);Z=Editor.createSvgDataUri(mxUtils.getXml(Aa));
-var Za=Z.indexOf(";");0<Za&&(Z=Z.substring(0,Za)+Z.substring(Z.indexOf(",",Za+1)));N.setCellStyles("image",Z,[Pa[0]])});Ta.src=Editor.createSvgDataUri(mxUtils.getXml(Aa))}return Pa}}}catch(Za){}return null})):ia(E,mxUtils.bind(this,function(){return y(va,"text/xml",f+E*aa,g+E*aa,0,0,Q.name)}))}else ia(E,mxUtils.bind(this,function(){return null}))}else{da=!1;if("image/png"==Q.type){var ja=T?null:this.extractGraphModelFromPng(R.target.result);if(null!=ja&&0<ja.length){var sa=new Image;sa.src=R.target.result;
-ia(E,mxUtils.bind(this,function(){return y(ja,"text/xml",f+E*aa,g+E*aa,sa.width,sa.height,Q.name)}));da=!0}}da||(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(R.target.result,mxUtils.bind(this,function(ya){this.resizeImage(ya,R.target.result,mxUtils.bind(this,
-function(Aa,Ea,za){ia(E,mxUtils.bind(this,function(){if(null!=Aa&&Aa.length<H){var Ia=la&&this.isResampleImageSize(Q.size,S)?Math.min(1,Math.min(x/Ea,x/za)):1;return y(Aa,Q.type,f+E*aa,g+E*aa,Math.round(Ea*Ia),Math.round(za*Ia),Q.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),la,x,S,Q.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else Z=R.target.result,y(Z,Q.type,f+E*aa,g+E*aa,240,160,Q.name,function(ya){ia(E,
-function(){return ya})},Q)});/(\.v(dx|sdx?))($|\?)/i.test(Q.name)||/(\.vs(x|sx?))($|\?)/i.test(Q.name)?y(null,Q.type,f+E*aa,g+E*aa,240,160,Q.name,function(R){ia(E,function(){return R})},Q):"image"==Q.type.substring(0,5)||"application/pdf"==Q.type?Y.readAsDataURL(Q):Y.readAsText(Q)}})(q)});if(ra){ra=[];for(oa=0;oa<d.length;oa++)ra.push(d[oa]);d=ra;this.confirmImageResize(function(N){la=N;na()},I)}else na()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&
-this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(d,f){f=null!=f?f:!1;var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},x=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,y=function(t,G){if(t||f)mxSettings.setResizeImages(t?G:null),mxSettings.save();g();d(G)};null==x||f?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(t){y(t,!0)},function(t){y(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?220:200,!0,!0):y(!1,x)};EditorUi.prototype.parseFile=function(d,f,g){g=null!=g?g:d.name;var x=new FileReader;x.onload=mxUtils.bind(this,function(){this.parseFileData(x.result,f,g)});x.readAsText(d)};EditorUi.prototype.parseFileData=
-function(d,f,g){var x=new XMLHttpRequest;x.open("POST",OPEN_URL);x.setRequestHeader("Content-Type","application/x-www-form-urlencoded");x.onreadystatechange=function(){f(x)};x.send("format=xml&filename="+encodeURIComponent(g)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(y){}};EditorUi.prototype.isResampleImageSize=function(d,f){f=null!=f?f:this.resampleThreshold;return d>f};EditorUi.prototype.resizeImage=function(d,f,g,x,y,t,
-G){y=null!=y?y:this.maxImageSize;var D=Math.max(1,d.width),I=Math.max(1,d.height);if(x&&this.isResampleImageSize(null!=G?G:f.length,t))try{var H=Math.max(D/y,I/y);if(1<H){var S=Math.round(D/H),T=Math.round(I/H),M=document.createElement("canvas");M.width=S;M.height=T;M.getContext("2d").drawImage(d,0,0,S,T);var fa=M.toDataURL();if(fa.length<f.length){var la=document.createElement("canvas");la.width=S;la.height=T;var ra=la.toDataURL();fa!==ra&&(f=fa,D=S,I=T)}}}catch(ba){}g(f,D,I)};EditorUi.prototype.extractGraphModelFromPng=
-function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,f,g){try{var x=new Image;x.onload=function(){x.width=0<x.width?x.width:120;x.height=0<x.height?x.height:120;f(x)};null!=g&&(x.onerror=g);x.src=d}catch(y){if(null!=g)g(y);else throw y;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:d)};var C=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=
-mxStencilRegistry.allowEval&&!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var d=this,f=this.editor.graph;Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(ba){var oa=ba.getEvent();
-return null==ba.getState()&&!mxEvent.isMouseEvent(oa)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(oa)&&(null==ba.getState()||mxEvent.isControlDown(oa)||mxEvent.isShiftDown(oa))});f.cellEditor.editPlantUmlData=function(ba,oa,na){var N=JSON.parse(na);oa=new TextareaDialog(d,mxResources.get("plantUml")+":",N.data,function(aa){null!=aa&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(aa,N.format,function(V,ha,X){d.spinner.stop();f.getModel().beginUpdate();try{if("txt"==
-N.format)f.labelChanged(ba,"<pre>"+V+"</pre>"),f.updateCellSize(ba,!0);else{f.setCellStyles("image",d.convertDataUri(V),[ba]);var ia=f.model.getGeometry(ba);null!=ia&&(ia=ia.clone(),ia.width=ha,ia.height=X,f.cellsResized([ba],[ia],!1))}f.setAttributeForCell(ba,"plantUmlData",JSON.stringify({data:aa,format:N.format}))}finally{f.getModel().endUpdate()}},function(V){d.handleError(V)})},null,null,400,220);d.showDialog(oa.container,420,300,!0,!0);oa.init()};f.cellEditor.editMermaidData=function(ba,oa,
-na){var N=JSON.parse(na);oa=new TextareaDialog(d,mxResources.get("mermaid")+":",N.data,function(aa){null!=aa&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(aa,N.config,function(V,ha,X){d.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",V,[ba]);var ia=f.model.getGeometry(ba);null!=ia&&(ia=ia.clone(),ia.width=Math.max(ia.width,ha),ia.height=Math.max(ia.height,X),f.cellsResized([ba],[ia],!1));f.setAttributeForCell(ba,"mermaidData",JSON.stringify({data:aa,
-config:N.config},null,2))}finally{f.getModel().endUpdate()}},function(V){d.handleError(V)})},null,null,400,220);d.showDialog(oa.container,420,300,!0,!0);oa.init()};var g=f.cellEditor.startEditing;f.cellEditor.startEditing=function(ba,oa){try{var na=this.graph.getAttributeForCell(ba,"plantUmlData");if(null!=na)this.editPlantUmlData(ba,oa,na);else if(na=this.graph.getAttributeForCell(ba,"mermaidData"),null!=na)this.editMermaidData(ba,oa,na);else{var N=f.getCellStyle(ba);"1"==mxUtils.getValue(N,"metaEdit",
-"0")?d.showDataDialog(ba):g.apply(this,arguments)}}catch(aa){d.handleError(aa)}};f.getLinkTitle=function(ba){return d.getLinkTitle(ba)};f.customLinkClicked=function(ba){var oa=!1;try{d.handleCustomLink(ba),oa=!0}catch(na){d.handleError(na)}return oa};var x=f.parseBackgroundImage;f.parseBackgroundImage=function(ba){var oa=x.apply(this,arguments);null!=oa&&null!=oa.src&&Graph.isPageLink(oa.src)&&(oa={originalSrc:oa.src});return oa};var y=f.setBackgroundImage;f.setBackgroundImage=function(ba){null!=
-ba&&null!=ba.originalSrc&&(ba=d.createImageForPageLink(ba.originalSrc,d.currentPage,this));y.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(ba,oa){ba=null!=f.backgroundImage?f.backgroundImage.originalSrc:null;if(null!=ba){var na=ba.indexOf(",");if(0<na)for(ba=ba.substring(na+
-1),oa=oa.getProperty("patches"),na=0;na<oa.length;na++)if(null!=oa[na][EditorUi.DIFF_UPDATE]&&null!=oa[na][EditorUi.DIFF_UPDATE][ba]||null!=oa[na][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(oa[na][EditorUi.DIFF_REMOVE],ba)){f.refreshBackgroundImage();break}}}));var t=f.getBackgroundImageObject;f.getBackgroundImageObject=function(ba,oa){var na=t.apply(this,arguments);if(null!=na&&null!=na.originalSrc)if(!oa)na={src:na.originalSrc};else if(oa&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var N=
-this.stylesheet,aa=this.shapeForegroundColor,V=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";na=d.createImageForPageLink(na.originalSrc);this.shapeBackgroundColor=V;this.shapeForegroundColor=aa;this.stylesheet=N}return na};var G=this.clearDefaultStyle;this.clearDefaultStyle=function(){G.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink=
-"https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var D=d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(ba){ba=null!=ba?ba:"";"1"==urlParams.dev&&(ba+=(0<ba.length?"&":"?")+"dev=1");return D.apply(this,arguments)};var I=f.addClickHandler;f.addClickHandler=function(ba,oa,na){var N=oa;oa=function(aa,V){if(null==
-V){var ha=mxEvent.getSource(aa);"a"==ha.nodeName.toLowerCase()&&(V=ha.getAttribute("href"))}null!=V&&f.isCustomLink(V)&&(mxEvent.isTouchEvent(aa)||!mxEvent.isPopupTrigger(aa))&&f.customLinkClicked(V)&&mxEvent.consume(aa);null!=N&&N(aa,V)};I.call(this,ba,oa,na)};C.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var H=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(ba,oa,na){d.editor.graph.isSelectionEmpty()?
-H.apply(this,arguments):d.menus.addMenuItems(ba,"delete - cut copy copyAsImage - duplicate".split(" "),null,na)}}d.actions.get("print").funct=function(){d.showDialog((new PrintDialog(d)).container,360,null!=d.pages&&1<d.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var S=f.getExportVariables;f.getExportVariables=function(){var ba=S.apply(this,arguments),oa=d.getCurrentFile();null!=oa&&(ba.filename=oa.getTitle());ba.pagecount=null!=d.pages?d.pages.length:1;ba.page=
-null!=d.currentPage?d.currentPage.getName():"";ba.pagenumber=null!=d.pages&&null!=d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return ba};var T=f.getGlobalVariable;f.getGlobalVariable=function(ba){var oa=d.getCurrentFile();return"filename"==ba&&null!=oa?oa.getTitle():"page"==ba&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==ba?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:"pagecount"==ba?null!=d.pages?d.pages.length:1:T.apply(this,arguments)};
-var M=f.labelLinkClicked;f.labelLinkClicked=function(ba,oa,na){var N=oa.getAttribute("href");if(null==N||!f.isCustomLink(N)||!mxEvent.isTouchEvent(na)&&mxEvent.isPopupTrigger(na))M.apply(this,arguments);else{if(!f.isEnabled()||null!=ba&&f.isCellLocked(ba.cell))f.customLinkClicked(N),f.getRubberband().reset();mxEvent.consume(na)}};this.editor.getOrCreateFilename=function(){var ba=d.defaultFilename,oa=d.getCurrentFile();null!=oa&&(ba=null!=oa.getTitle()?oa.getTitle():ba);return ba};var fa=this.actions.get("print");
-fa.setEnabled(!mxClient.IS_IOS||!navigator.standalone);fa.visible=fa.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),
-this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,
-mxUtils.bind(this,function(ba){var oa=f.cellEditor.text2,na=null;null!=oa&&(mxEvent.addListener(oa,"dragleave",function(N){null!=na&&(na.parentNode.removeChild(na),na=null);N.stopPropagation();N.preventDefault()}),mxEvent.addListener(oa,"dragover",mxUtils.bind(this,function(N){null==na&&(!mxClient.IS_IE||10<document.documentMode)&&(na=this.highlightElement(oa));N.stopPropagation();N.preventDefault()})),mxEvent.addListener(oa,"drop",mxUtils.bind(this,function(N){null!=na&&(na.parentNode.removeChild(na),
-na=null);if(0<N.dataTransfer.files.length)this.importFiles(N.dataTransfer.files,0,0,this.maxImageSize,function(V,ha,X,ia,q,E){f.insertImage(V,q,E)},function(){},function(V){return"image/"==V.type.substring(0,6)},function(V){for(var ha=0;ha<V.length;ha++)V[ha]()},mxEvent.isControlDown(N));else if(0<=mxUtils.indexOf(N.dataTransfer.types,"text/uri-list")){var aa=N.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(aa)?this.loadImage(decodeURIComponent(aa),mxUtils.bind(this,
-function(V){var ha=Math.max(1,V.width);V=Math.max(1,V.height);var X=this.maxImageSize;X=Math.min(1,Math.min(X/Math.max(1,ha)),X/Math.max(1,V));f.insertImage(decodeURIComponent(aa),ha*X,V*X)})):document.execCommand("insertHTML",!1,N.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(N.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,N.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(N.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,N.dataTransfer.getData("text/plain"));
-N.stopPropagation();N.preventDefault()})))}));this.isSettingsEnabled()&&(fa=this.editor.graph.view,fa.setUnit(mxSettings.getUnit()),fa.addListener("unitChanged",function(ba,oa){mxSettings.setUnit(oa.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,fa.unit),this.refresh());if("1"==urlParams.styledev){fa=document.getElementById("geFooter");
-null!=fa&&(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)})),fa.appendChild(this.styleInput),
-this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(ba,oa){0<this.editor.graph.getSelectionCount()?(ba=this.editor.graph.getSelectionCell(),ba=this.editor.graph.getModel().getStyle(ba),this.styleInput.value=ba||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var la=this.isSelectionAllowed;this.isSelectionAllowed=function(ba){return mxEvent.getSource(ba)==this.styleInput?!0:la.apply(this,arguments)}}fa=document.getElementById("geInfo");
-null!=fa&&fa.parentNode.removeChild(fa);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var ra=null;mxEvent.addListener(f.container,"dragleave",function(ba){f.isEnabled()&&(null!=ra&&(ra.parentNode.removeChild(ra),ra=null),ba.stopPropagation(),ba.preventDefault())});mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(ba){null==ra&&(!mxClient.IS_IE||10<document.documentMode)&&(ra=this.highlightElement(f.container));null!=this.sidebar&&this.sidebar.hideTooltip();
-ba.stopPropagation();ba.preventDefault()}));mxEvent.addListener(f.container,"drop",mxUtils.bind(this,function(ba){null!=ra&&(ra.parentNode.removeChild(ra),ra=null);if(f.isEnabled()){var oa=mxUtils.convertPoint(f.container,mxEvent.getClientX(ba),mxEvent.getClientY(ba)),na=ba.dataTransfer.files,N=f.view.translate,aa=f.view.scale,V=oa.x/aa-N.x,ha=oa.y/aa-N.y;if(0<na.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(ba)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),
-this.openFiles(na,!0)):(mxEvent.isAltDown(ba)&&(ha=V=null),this.importFiles(na,V,ha,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(ba),null,null,mxEvent.isShiftDown(ba),ba));else{mxEvent.isAltDown(ba)&&(ha=V=0);var X=0<=mxUtils.indexOf(ba.dataTransfer.types,"text/uri-list")?ba.dataTransfer.getData("text/uri-list"):null;oa=this.extractGraphModelFromEvent(ba,null!=this.pages);if(null!=oa)f.setSelectionCells(this.importXml(oa,V,ha,!0));else if(0<=mxUtils.indexOf(ba.dataTransfer.types,"text/html")){var ia=
-ba.dataTransfer.getData("text/html");oa=document.createElement("div");oa.innerHTML=f.sanitizeHtml(ia);var q=null;na=oa.getElementsByTagName("img");null!=na&&1==na.length?(ia=na[0].getAttribute("src"),null==ia&&(ia=na[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(ia)||(q=!0)):(na=oa.getElementsByTagName("a"),null!=na&&1==na.length?ia=na[0].getAttribute("href"):(oa=oa.getElementsByTagName("pre"),null!=oa&&1==oa.length&&(ia=mxUtils.getTextContent(oa[0]))));var E=!0,Q=mxUtils.bind(this,
-function(){f.setSelectionCells(this.insertTextAt(ia,V,ha,!0,q,null,E,mxEvent.isControlDown(ba)))});q&&null!=ia&&ia.length>this.resampleThreshold?this.confirmImageResize(function(Y){E=Y;Q()},mxEvent.isControlDown(ba)):Q()}else null!=X&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(X)?this.loadImage(decodeURIComponent(X),mxUtils.bind(this,function(Y){var R=Math.max(1,Y.width);Y=Math.max(1,Y.height);var Z=this.maxImageSize;Z=Math.min(1,Math.min(Z/Math.max(1,R)),Z/Math.max(1,Y));f.setSelectionCell(f.insertVertex(null,
-null,"",V,ha,R*Z,Y*Z,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+X+";"))}),mxUtils.bind(this,function(Y){f.setSelectionCells(this.insertTextAt(X,V,ha,!0))})):0<=mxUtils.indexOf(ba.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(ba.dataTransfer.getData("text/plain"),V,ha,!0))}}ba.stopPropagation();ba.preventDefault()}),!1)}f.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();
-fa=mxUtils.bind(this,function(){f.refresh();f.view.validateBackground();this.updateTabContainer()});this.addListener("darkModeChanged",fa);this.addListener("sketchModeChanged",fa);this.addListener("currentThemeChanged",mxUtils.bind(this,function(){this.updateUserElement();this.refresh()}));"dark"==uiTheme?(this.doSetDarkMode(!0),this.fireEvent(new mxEventObject("darkModeChanged"))):"min"==uiTheme&&"1"!=urlParams.embedInline&&this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&
-!mxClient.IS_IE11:null!=mxSettings.settings.darkMode?mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var d=this.editor.graph;d.container.addEventListener("paste",mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var g=f.clipboardData||f.originalEvent.clipboardData,x=!1,y=0;y<g.types.length;y++)if("text/"===g.types[y].substring(0,
-5)){x=!0;break}if(!x){var t=g.items;for(index in t){var G=t[index];if("file"===G.kind){if(d.isEditing())this.importFiles([G.getAsFile()],0,0,this.maxImageSize,function(I,H,S,T,M,fa){d.insertImage(I,M,fa)},function(){},function(I){return"image/"==I.type.substring(0,6)},function(I){for(var H=0;H<I.length;H++)I[H]()});else{var D=this.editor.graph.getInsertPoint();this.importFiles([G.getAsFile()],D.x,D.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(I){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=
-function(){function d(){window.setTimeout(function(){g.innerHTML="&nbsp;";g.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,g=document.createElement("div");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect","off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck","false");g.style.textRendering="optimizeSpeed";g.style.fontFamily="monospace";g.style.wordBreak="break-all";g.style.background="transparent";g.style.color="transparent";g.style.position=
-"absolute";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.display="block";g.style.fontSize="1";g.style.zIndex="-1";g.style.resize="none";g.style.outline="none";g.style.width="1px";g.style.height="1px";mxUtils.setOpacity(g,0);g.contentEditable=!0;g.innerHTML="&nbsp;";var x=!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 G=mxEvent.getSource(t);
-null==f.container||!f.isEnabled()||f.isMouseDown||f.isEditing()||null!=this.dialog||"INPUT"==G.nodeName||"TEXTAREA"==G.nodeName||224!=t.keyCode&&(mxClient.IS_MAC||17!=t.keyCode)&&(!mxClient.IS_MAC||91!=t.keyCode&&93!=t.keyCode)||x||(g.style.left=f.container.scrollLeft+10+"px",g.style.top=f.container.scrollTop+10+"px",t=f.container.scrollLeft,G=f.container.scrollTop,f.container.appendChild(g),x=!0,g.focus(),document.execCommand("selectAll",!1,null),f.container.scrollLeft=t,f.container.scrollTop=G)}));
-mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(t){var G=t.keyCode;window.setTimeout(mxUtils.bind(this,function(){!x||224!=G&&17!=G&&91!=G&&93!=G||(x=!1,f.isEditing()||null!=this.dialog||null==f.container||f.container.focus(),g.parentNode.removeChild(g),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this,function(t){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g),d()}catch(G){this.handleError(G)}}));mxEvent.addListener(g,"cut",
-mxUtils.bind(this,function(t){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g,!0),d()}catch(G){this.handleError(G)}}));mxEvent.addListener(g,"paste",mxUtils.bind(this,function(t){if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&(g.innerHTML="&nbsp;",g.focus(),null!=t.clipboardData&&this.pasteCells(t,g,!0,!0),!mxEvent.isConsumed(t))){var G=f.container.scrollLeft,D=f.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){f.container.scrollLeft=G;f.container.scrollTop=D;
-this.pasteCells(t,g,!1,!0)}),0)}}),!0);var y=this.isSelectionAllowed;this.isSelectionAllowed=function(t){return mxEvent.getSource(t)==g?!0:y.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(d,f){mxSettings.setUi(d);(f=this.doSetCurrentTheme(d)||f)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.doSetCurrentTheme=function(d){function f(S){return""==S||"dark"==S||"kennedy"==S||null==S}var g=Editor.currentTheme;d=f(d)?"default":d;g=f(g)?"default":g;var x=
-"sketch"==g&&"default"==d||"default"==g&&"sketch"==d;if(x&&"1"==urlParams["live-ui"]&&!this.themeSwitching){Editor.currentTheme=d;this.themeSwitching=!0;var y=this.editor.graph.view.translate,t=y.x,G=y.y,D=mxUtils.getOffset(this.editor.graph.container),I=this.editor.graph.container.scrollLeft-D.x,H=this.editor.graph.container.scrollTop-D.y;mxUtils.setPrefixedStyle(this.container.style,"transition","all 100ms");window.setTimeout(mxUtils.bind(this,function(){this.container.style.opacity="0";window.setTimeout(mxUtils.bind(this,
-function(){"sketch"==g&&"default"==d?(this.sidebarFooterContainer.style.display="block",this.menubarContainer.style.display="block",this.toolbarContainer.style.display="block",this.tabContainer.style.display="block",this.hsplit.style.display="block",this.hsplitPosition=EditorUi.prototype.hsplitPosition,this.menubarHeight=App.prototype.menubarHeight,this.formatWidth=EditorUi.prototype.formatWidth):"default"==g&&"sketch"==d&&(this.sidebarFooterContainer.style.display="none",this.menubarContainer.style.display=
-"none",this.toolbarContainer.style.display="none",this.tabContainer.style.display="none",this.hsplit.style.display="none",this.formatWidth=this.menubarHeight=this.hsplitPosition=0);this.switchTheme(d);window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("currentThemeChanged"));this.editor.graph.refresh();var S=this.editor.graph.view.scale;D=mxUtils.getOffset(this.editor.graph.container);this.editor.graph.container.scrollLeft=I+D.x+(y.x-t)*S;this.editor.graph.container.scrollTop=
-H+D.y+(y.y-G)*S;this.container.style.opacity="";window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.container.style,"transition",null);delete this.themeSwitching}),100)}),100)}),100)}),0)}return x};EditorUi.prototype.switchTheme=function(d){this.switchThemeConstants(d);this.switchCssForTheme(d);this.createWrapperForTheme(d);this.createPickerMenuForTheme(d);this.createMainMenuForTheme(d);this.createMenubarForTheme(d);this.createFooterMenuForTheme(d);this.sidebarContainer.style.display=
-"";"sketch"==d?(this.createFormatWindow(),this.formatContainer.style.left="0px",this.formatContainer.style.top="0px",this.formatContainer.style.width="",this.createShapesWindow(),this.sidebarContainer.style.left="0px",this.sidebarContainer.style.top="0px",this.sidebarContainer.style.bottom="0px",this.sidebarContainer.style.width="100%"):"default"==d&&null!=this.formatContainer&&(this.formatContainer.style.left="",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));null!=this.format&&(d="default"==d||"atlas"==d,this.format.showCloseButton!=d&&(this.format.showCloseButton=d,this.format.refresh()))};EditorUi.prototype.destroyWindows=function(){null!=this.sidebarWindow&&(this.sidebarWindow.destroy(),
-this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.destroy(),this.formatWindow=null);null!=this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&
-(this.menus.findWindow.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null);null!=this.menus.commentsWindow&&(this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null)};EditorUi.prototype.switchThemeConstants=function(d){this.destroyWindows();"sketch"==d?(mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src,mxWindow.prototype.minimizeImage=
-Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src,mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src):(mxWindow.prototype.closeImage=mxClient.imageBasePath+"/close.gif",mxWindow.prototype.minimizeImage=mxClient.imageBasePath+"/minimize.gif",mxWindow.prototype.normalizeImage=mxClient.imageBasePath+"/normalize.gif")};EditorUi.prototype.switchCssForTheme=
-function(d){"sketch"==d?null==this.sketchStyleElt&&(this.sketchStyleElt=document.createElement("style"),this.sketchStyleElt.setAttribute("type","text/css"),this.sketchStyleElt.innerHTML=Editor.createMinimalCss(),document.getElementsByTagName("head")[0].appendChild(this.sketchStyleElt)):null!=this.sketchStyleElt&&(this.sketchStyleElt.parentNode.removeChild(this.sketchStyleElt),this.sketchStyleElt=null)};EditorUi.prototype.createWrapperForTheme=function(d){"sketch"==d?(null==this.sketchWrapperElt&&
-(this.sketchWrapperElt=document.createElement("div"),this.sketchWrapperElt.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;"),this.diagramContainer.parentNode.appendChild(this.sketchWrapperElt),this.sketchWrapperElt.appendChild(this.diagramContainer)):null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode&&(this.tabContainer.parentNode.insertBefore(this.diagramContainer,this.tabContainer),this.sketchWrapperElt.parentNode.removeChild(this.sketchWrapperElt))};
-EditorUi.prototype.createMainMenuForTheme=function(d){if("sketch"==d&&null==this.sketchMainMenuElt){this.sketchMainMenuElt=document.createElement("div");this.sketchMainMenuElt.className="geToolbarContainer";this.sketchMainMenuElt.style.cssText="position:absolute;left:10px;top:10px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;";this.sketchMainMenuElt.appendChild(this.createMenu("diagram",
-Editor.menuImage));this.sketchMainMenuElt.appendChild(this.createMenuItem("delete",Editor.trashImage));var f=this.sketchMainMenuElt.appendChild(this.createMenuItem("undo",Editor.undoImage)),g=this.sketchMainMenuElt.appendChild(this.createMenuItem("redo",Editor.redoImage));d=mxUtils.bind(this,function(){f.style.display=0<this.editor.undoManager.history.length||this.editor.graph.isEditing()?"inline-block":"none";g.style.display=f.style.display});this.actions.get("undo").addListener("stateChanged",d);
-this.actions.get("redo").addListener("stateChanged",d);d();this.sketchWrapperElt.appendChild(this.sketchMainMenuElt)}};EditorUi.prototype.createFooterMenuForTheme=function(d){if("sketch"==d&&null==this.sketchFooterMenuElt){this.sketchFooterMenuElt=document.createElement("div");this.sketchFooterMenuElt.className="geToolbarContainer";this.sketchFooterMenuElt.style.cssText="position:absolute;right:14px;bottom:14px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;";
-d=this.sketchFooterMenuElt;var f=this.createPageMenuTab(!1,!0);f.className="geToolbarButton";f.style.cssText="display:inline-block;cursor:pointer;overflow:hidden;padding:4px;white-space:nowrap;max-width:160px;text-overflow:ellipsis;filter:none;opacity:1;";d.appendChild(f);var g=mxUtils.bind(this,function(){f.innerText="";if(null!=this.currentPage){mxUtils.write(f,this.currentPage.getName());var x=null!=this.pages?this.pages.length:1,y=this.getPageIndex(this.currentPage);y=null!=y?y+1:1;var t=this.currentPage.getId();
-f.setAttribute("title",this.currentPage.getName()+" ("+y+"/"+x+")"+(null!=t?" ["+t+"]":""))}});this.editor.addListener("pagesPatched",g);this.editor.addListener("pageSelected",g);this.editor.addListener("pageRenamed",g);this.editor.addListener("fileLoaded",g);g();g=mxUtils.bind(this,function(){f.style.display=null!=this.pages&&("0"!=urlParams.pages||1<this.pages.length||Editor.pagesVisible)?"inline-block":"none"});this.addListener("fileDescriptorChanged",g);this.addListener("pagesVisibleChanged",
-g);this.editor.addListener("pagesPatched",g);g();d.appendChild(this.createMenuItem("zoomOut",Editor.zoomOutImage));g=this.createMenu("viewZoom",Editor.plusImage);g.setAttribute("title",mxResources.get("zoom"));g.innerHTML="100%";g.className="geToolbarButton";g.style.cssText="display:inline-block;position:relative;vertical-align:top;opacity:1;color:inherit;padding:4px;box-shadow:none;width:40px;text-align:center;margin-right:-6px;filter:none;";d.appendChild(g);mxUtils.bind(this,function(x){mxEvent.addListener(x,
-"click",mxUtils.bind(this,function(t){mxEvent.isAltDown(t)?(this.hideCurrentMenu(),this.actions.get("customZoom").funct(),mxEvent.consume(t)):mxEvent.isShiftDown(t)&&(this.hideCurrentMenu(),this.actions.get("smartFit").funct(),mxEvent.consume(t))}));var y=mxUtils.bind(this,function(){x.innerText="";mxUtils.write(x,Math.round(100*this.editor.graph.view.scale)+"%")});this.editor.graph.view.addListener(mxEvent.EVENT_SCALE,y);this.editor.addListener("resetGraphView",y);this.editor.addListener("pageSelected",
-y)})(g);d.appendChild(this.createMenuItem("zoomIn",Editor.zoomInImage));this.sketchWrapperElt.appendChild(this.sketchFooterMenuElt)}};EditorUi.prototype.createPickerMenuForTheme=function(d){if("sketch"==d&&null==this.sketchPickerMenuElt){this.sketchPickerMenuElt=document.createElement("div");this.sketchPickerMenuElt.className="geToolbarContainer";this.sketchPickerMenuElt.style.cssText="position:absolute;left:10px;border-radius:4px;padding:0px 4px 4px;white-space:nowrap;z-index:1;transform:translate(0, -50%);top:50%;user-select:none;width:40px;";
-var f=this.sketchPickerMenuElt;mxUtils.setPrefixedStyle(f.style,"transition","transform .3s ease-out");var g=document.createElement("a");g.style.padding="0px";g.style.boxShadow="none";g.className="geMenuItem";g.style.display="block";g.style.width="100%";g.style.height="14px";g.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";g.style.backgroundPosition="top center";g.style.backgroundRepeat="no-repeat";g.setAttribute("title","Minimize");var x=this.createMenuItem("insertFreehand",Editor.freehandImage,
-!0);x.style.paddingLeft="12px";x.style.backgroundSize="";x.style.width="26px";x.style.height="30px";x.style.opacity="0.7";var y=this.createMenu("insert",Editor.plusImage);y.style.backgroundSize="";y.style.marginBottom="4px";y.style.display="block";y.style.width="30px";y.style.height="30px";y.style.padding="4px";y.style.opacity="0.7";var t=!1,G=mxUtils.bind(this,function(){f.innerText="";if(!t){var D=function(H,S,T,M){null!=S&&H.setAttribute("title",S);H.style.cursor="pointer";H.style.margin="8px 0px";
-H.style.display="block";f.appendChild(H);null!=M&&(H.style.position="relative",H.style.overflow="visible",S=document.createElement("div"),S.style.position="absolute",S.style.fontSize="8px",S.style.left="32px",S.style.top="28px",mxUtils.write(S,M),H.appendChild(S));return H};D(this.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+
-" (A)",null,"A");D(this.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");D(this.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle")+" (D)",
-!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");D(this.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");var I=new mxCell("",new mxGeometry(0,0,this.editor.graph.defaultEdgeLength+20,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");I.geometry.setTerminalPoint(new mxPoint(0,0),!0);I.geometry.setTerminalPoint(new mxPoint(I.geometry.width,0),!1);I.geometry.points=
-[];I.geometry.relative=!0;I.edge=!0;D(this.sidebar.createEdgeTemplateFromCells([I],I.geometry.width,I.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");I=I.clone();I.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";I.geometry.width=this.editor.graph.defaultEdgeLength+20;I.geometry.setTerminalPoint(new mxPoint(0,20),!0);I.geometry.setTerminalPoint(new mxPoint(I.geometry.width,20),!1);
-D(this.sidebar.createEdgeTemplateFromCells([I],I.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));D(x,mxResources.get("freehand")+" (X)",null,"X");this.sketchPickerMenuElt.appendChild(y)}"1"!=urlParams.embedInline&&f.appendChild(g)});mxEvent.addListener(g,"click",mxUtils.bind(this,function(){t?(mxUtils.setPrefixedStyle(f.style,"transform","translate(0, -50%)"),f.style.padding="8px 6px 4px",f.style.width="40px",f.style.top="50%",f.style.bottom="",f.style.height="",
-g.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",g.setAttribute("title","Minimize"),g.style.height="14px",t=!1,G()):(f.innerText="",f.appendChild(g),mxUtils.setPrefixedStyle(f.style,"transform","translate(0, 0)"),f.style.bottom="12px",f.style.padding="0px",f.style.height="24px",f.style.width="24px",f.style.top="",g.style.backgroundImage="url("+Editor.plusImage+")",g.setAttribute("title",mxResources.get("insert")),g.style.height="24px",t=!0)}));this.addListener("darkModeChanged",
-G);this.addListener("sketchModeChanged",G);G();this.sketchWrapperElt.appendChild(this.sketchPickerMenuElt)}};EditorUi.prototype.createMenubarForTheme=function(d){"sketch"==d?(null==this.sketchMenubarElt&&(this.sketchMenubarElt=document.createElement("div"),this.sketchMenubarElt.className="geToolbarContainer",this.sketchMenubarElt.style.cssText="position:absolute;right:14px;top:10px;height:44px;border-radius:4px;padding:7px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;",
-this.sketchWrapperElt.appendChild(this.sketchMenubarElt)),null!=this.userElement&&this.sketchMenubarElt.appendChild(this.userElement),d=this.menubar.langIcon,null!=d&&(d.style.position="relative",d.style.height="21px",d.style.width="21px",d.style.right="0px",d.style.top="3px",this.sketchMenubarElt.appendChild(d))):(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.right=
-"14px",d.style.top="5px",document.body.appendChild(d)))};EditorUi.prototype.createMenu=function(d,f){var g=this.menus.get(d),x=this.menubar.addMenu(mxResources.get(d),g.funct);x.className="geToolbarButton";x.style.display="inline-block";x.style.cursor="pointer";x.style.height="24px";x.setAttribute("title",mxResources.get(d));this.menus.menuCreated(g,x,"geMenuItem");null!=f&&(x.style.backgroundImage="url("+f+")",x.style.backgroundPosition="center center",x.style.backgroundRepeat="no-repeat",x.style.backgroundSize=
-"100% 100%",x.style.width="24px",x.innerText="");return x};EditorUi.prototype.createMenuItem=function(d,f,g){var x=document.createElement("a");x.className="geToolbarButton";x.setAttribute("title",mxResources.get(d));x.style.backgroundImage="url("+f+")";x.style.backgroundPosition="center center";x.style.backgroundRepeat="no-repeat";x.style.backgroundSize="100% 100%";x.style.display="inline-block";x.style.cursor="pointer";x.style.marginLeft="6px";x.style.width="24px";x.style.height="24px";var y=this.actions.get(d);
-null!=y&&(mxEvent.addListener(x,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(t){t.preventDefault()})),mxEvent.addListener(x,"click",function(t){"disabled"!=x.getAttribute("disabled")&&y.funct(t);mxEvent.consume(t)}),g||(d=function(){y.isEnabled()?(x.removeAttribute("disabled"),x.style.cursor="pointer"):(x.setAttribute("disabled","disabled"),x.style.cursor="default");x.style.opacity=y.isEnabled()?"":"0.2"},this.editor.graph.addListener("enabledChanged",d),y.addListener("stateChanged",
-d),d()));return x};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var d=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),f="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60,g="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),d,f,240,g,mxUtils.bind(this,function(x){x.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,
-mxUtils.bind(this,function(){this.formatWindow.window.fit()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);this.formatWindow.window.setVisible(!1)}};EditorUi.prototype.createShapesWindow=function(){if(null==this.sidebarWindow){var d=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),f="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,650);this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),"sketch"==Editor.currentTheme&&
-"1"!=urlParams.embedInline?66:10,"sketch"==Editor.currentTheme&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-f)/2):56,d-6,f-6,mxUtils.bind(this,function(g){g.appendChild(this.sidebarContainer)}));this.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);this.sidebarWindow.window.setVisible(!1)}};EditorUi.prototype.setSketchMode=function(d){this.spinner.spin(document.body,
-mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(d);null==urlParams.rough&&(mxSettings.settings.sketchMode=d,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }html body .mxCellEditor { color: #f0f0f0; }":
+!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var e=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!e.getContext||!e.getContext("2d"))}catch(t){}try{var f=document.createElement("canvas"),k=new Image;k.onload=function(){try{f.getContext("2d").drawImage(k,0,0);var t=
+f.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=t&&6<t.length}catch(B){}};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{f=document.createElement("canvas");f.width=f.height=1;var z=f.toDataURL("image/jpeg");
+EditorUi.prototype.jpgSupported=null!==z.match("image/jpeg")}catch(t){}})();EditorUi.prototype.openLink=function(e,f,k){return this.editor.graph.openLink(e,f,k)};EditorUi.prototype.showSplash=function(e){};EditorUi.prototype.getLocalData=function(e,f){f(localStorage.getItem(e))};EditorUi.prototype.setLocalData=function(e,f,k){localStorage.setItem(e,f);null!=k&&k()};EditorUi.prototype.removeLocalData=function(e,f){localStorage.removeItem(e);f()};EditorUi.prototype.setShareCursorPosition=function(e){this.shareCursorPosition=
+e;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(e){this.showRemoteCursors=e;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(e){this.editor.graph.mathEnabled=e;this.editor.updateGraphComponents();this.editor.graph.refresh();
+this.editor.graph.defaultMathEnabled=e;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(e){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(e){return this.isOfflineApp()||!navigator.onLine||!e&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};
+EditorUi.prototype.createSpinner=function(e,f,k){var z=null==e||null==f;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:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),B=t.spin;t.spin=function(O,J){var y=!1;this.active||(B.call(this,O),this.active=!0,null!=J&&(z&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,e=document.body.clientWidth/2-2),y=document.createElement("div"),
+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,e)+"px",y.style.top=Math.max(0,f+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"),"..."!=J.substring(J.length-3,J.length)&&"!"!=J.charAt(J.length-1)&&(J+="..."),y.innerHTML=J,O.appendChild(y),t.status=y),this.pause=mxUtils.bind(this,function(){var ia=function(){};this.active&&(ia=mxUtils.bind(this,function(){this.spin(O,J)}));this.stop();return ia}),y=!0);return y};var I=t.stop;t.stop=function(){I.call(this);this.active=!1;null!=t.status&&null!=t.status.parentNode&&t.status.parentNode.removeChild(t.status);t.status=null};t.pause=function(){return function(){}};
+return t};EditorUi.prototype.isCompatibleString=function(e){try{var f=mxUtils.parseXml(e),k=this.editor.extractGraphModel(f.documentElement,!0);return null!=k&&0==k.getElementsByTagName("parsererror").length}catch(z){}return!1};EditorUi.prototype.isVisioData=function(e){return 8<e.length&&(208==e.charCodeAt(0)&&207==e.charCodeAt(1)&&17==e.charCodeAt(2)&&224==e.charCodeAt(3)&&161==e.charCodeAt(4)&&177==e.charCodeAt(5)&&26==e.charCodeAt(6)&&225==e.charCodeAt(7)||80==e.charCodeAt(0)&&75==e.charCodeAt(1)&&
+3==e.charCodeAt(2)&&4==e.charCodeAt(3)||80==e.charCodeAt(0)&&75==e.charCodeAt(1)&&3==e.charCodeAt(2)&&6==e.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(e){return 8<e.length&&(208==e.charCodeAt(0)&&207==e.charCodeAt(1)&&17==e.charCodeAt(2)&&224==e.charCodeAt(3)&&161==e.charCodeAt(4)&&177==e.charCodeAt(5)&&26==e.charCodeAt(6)&&225==e.charCodeAt(7)||60==e.charCodeAt(0)&&63==e.charCodeAt(1)&&120==e.charCodeAt(2)&&109==e.charCodeAt(3)&&108==e.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;
+EditorUi.prototype.createKeyHandler=function(e){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var k=f.getFunction,z=this.editor.graph,t=this;f.getFunction=function(B){if(z.isSelectionEmpty()&&null!=t.pages&&0<t.pages.length){var I=t.getSelectedPageIndex();if(mxEvent.isShiftDown(B)){if(37==B.keyCode)return function(){0<I&&t.movePage(I,I-1)};if(38==B.keyCode)return function(){0<I&&t.movePage(I,0)};if(39==B.keyCode)return function(){I<t.pages.length-1&&t.movePage(I,
+I+1)};if(40==B.keyCode)return function(){I<t.pages.length-1&&t.movePage(I,t.pages.length-1)}}else if(mxEvent.isControlDown(B)||mxClient.IS_MAC&&mxEvent.isMetaDown(B)){if(37==B.keyCode)return function(){0<I&&t.selectNextPage(!1)};if(38==B.keyCode)return function(){0<I&&t.selectPage(t.pages[0])};if(39==B.keyCode)return function(){I<t.pages.length-1&&t.selectNextPage(!0)};if(40==B.keyCode)return function(){I<t.pages.length-1&&t.selectPage(t.pages[t.pages.length-1])}}}return!(65<=B.keyCode&&90>=B.keyCode)||
+z.isSelectionEmpty()||mxEvent.isAltDown(B)||mxEvent.isShiftDown(B)||mxEvent.isControlDown(B)||mxClient.IS_MAC&&mxEvent.isMetaDown(B)?k.apply(this,arguments):null}}return f};var d=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(e){var f=d.apply(this,arguments);if(null==f)try{var k=e.indexOf("&lt;mxfile ");if(0<=k){var z=e.lastIndexOf("&lt;/mxfile&gt;");z>k&&(f=e.substring(k,z+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,
+""))}else{var t=mxUtils.parseXml(e),B=this.editor.extractGraphModel(t.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);f=null!=B?mxUtils.getXml(B):""}}catch(I){}return f};EditorUi.prototype.validateFileData=function(e){if(null!=e&&0<e.length){var f=e.indexOf('<meta charset="utf-8">');0<=f&&(e=e.slice(0,f)+'<meta charset="utf-8"/>'+e.slice(f+23-1,e.length));e=Graph.zapGremlins(e)}return e};EditorUi.prototype.replaceFileData=function(e){e=this.validateFileData(e);
+e=null!=e&&0<e.length?mxUtils.parseXml(e).documentElement:null;var f=null!=e?this.editor.extractGraphModel(e,!0):null;null!=f&&(e=f);if(null!=e){f=this.editor.graph;f.model.beginUpdate();try{var k=null!=this.pages?this.pages.slice():null,z=e.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<z.length||1==z.length&&z[0].hasAttribute("name")){this.fileNode=e;this.pages=null!=this.pages?this.pages:[];for(var t=z.length-1;0<=t;t--){var B=this.updatePageRoot(new DiagramPage(z[t]));null==B.getName()&&
+B.setName(mxResources.get("pageWithNumber",[t+1]));f.model.execute(new ChangePage(this,B,0==t?B:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=e.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(e.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),f.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(e),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);
+if(null!=k)for(t=0;t<k.length;t++)f.model.execute(new ChangePage(this,k[t],null))}finally{f.model.endUpdate()}}};EditorUi.prototype.createFileData=function(e,f,k,z,t,B,I,O,J,y,ia){f=null!=f?f:this.editor.graph;t=null!=t?t:!1;J=null!=J?J:!0;var da=null;if(null==k||k.getMode()==App.MODE_DEVICE||k.getMode()==App.MODE_BROWSER)var ja="_blank";else da=ja=z;if(null==e)return"";var aa=e;if("mxfile"!=aa.nodeName.toLowerCase()){if(ia){var qa=e.ownerDocument.createElement("diagram");qa.setAttribute("id",Editor.guid());
+qa.appendChild(e)}else{qa=Graph.zapGremlins(mxUtils.getXml(e));aa=Graph.compress(qa);if(Graph.decompress(aa)!=qa)return qa;qa=e.ownerDocument.createElement("diagram");qa.setAttribute("id",Editor.guid());mxUtils.setTextContent(qa,aa)}aa=e.ownerDocument.createElement("mxfile");aa.appendChild(qa)}y?(aa=aa.cloneNode(!0),aa.removeAttribute("modified"),aa.removeAttribute("host"),aa.removeAttribute("agent"),aa.removeAttribute("etag"),aa.removeAttribute("userAgent"),aa.removeAttribute("version"),aa.removeAttribute("editor"),
+aa.removeAttribute("type")):(aa.removeAttribute("userAgent"),aa.removeAttribute("version"),aa.removeAttribute("editor"),aa.removeAttribute("pages"),aa.removeAttribute("type"),mxClient.IS_CHROMEAPP?aa.setAttribute("host","Chrome"):EditorUi.isElectronApp?aa.setAttribute("host","Electron"):aa.setAttribute("host",window.location.hostname),aa.setAttribute("modified",(new Date).toISOString()),aa.setAttribute("agent",navigator.appVersion),aa.setAttribute("version",EditorUi.VERSION),aa.setAttribute("etag",
+Editor.guid()),e=null!=k?k.getMode():this.mode,null!=e&&aa.setAttribute("type",e),1<aa.getElementsByTagName("diagram").length&&null!=this.pages&&aa.setAttribute("pages",this.pages.length));ia=ia?mxUtils.getPrettyXml(aa):mxUtils.getXml(aa);if(!B&&!t&&(I||null!=k&&/(\.html)$/i.test(k.getTitle())))ia=this.getHtml2(mxUtils.getXml(aa),f,null!=k?k.getTitle():null,ja,da);else if(B||!t&&null!=k&&/(\.svg)$/i.test(k.getTitle()))null==k||k.getMode()!=App.MODE_DEVICE&&k.getMode()!=App.MODE_BROWSER||(z=null),
+ia=this.getEmbeddedSvg(ia,f,z,null,O,J,da);return ia};EditorUi.prototype.getXmlFileData=function(e,f,k,z){e=null!=e?e:!0;f=null!=f?f:!1;k=null!=k?k:!Editor.compressXml;var t=this.editor.getGraphXml(e,z);if(e&&null!=this.fileNode&&null!=this.currentPage)if(e=function(J){var y=J.getElementsByTagName("mxGraphModel");y=0<y.length?y[0]:null;null==y&&k?(y=mxUtils.trim(mxUtils.getTextContent(J)),J=J.cloneNode(!1),0<y.length&&(y=Graph.decompress(y),null!=y&&0<y.length&&J.appendChild(mxUtils.parseXml(y).documentElement))):
+null==y||k?J=J.cloneNode(!0):(J=J.cloneNode(!1),mxUtils.setTextContent(J,Graph.compressNode(y)));t.appendChild(J)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(t)),t=this.fileNode.cloneNode(!1),f)e(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var B=this.pages[f],I=B.node;if(B!=this.currentPage)if(B.needsUpdate){var O=new mxCodec(mxUtils.createXmlDocument());O=O.encode(new mxGraphModel(B.root));this.editor.graph.saveViewState(B.viewState,
+O,null,z);EditorUi.removeChildNodes(I);mxUtils.setTextContent(I,Graph.compressNode(O));delete B.needsUpdate}else z&&(this.updatePageRoot(B),null!=B.viewState.backgroundImage&&(null!=B.viewState.backgroundImage.originalSrc?B.viewState.backgroundImage=this.createImageForPageLink(B.viewState.backgroundImage.originalSrc,B):Graph.isPageLink(B.viewState.backgroundImage.src)&&(B.viewState.backgroundImage=this.createImageForPageLink(B.viewState.backgroundImage.src,B))),null!=B.viewState.backgroundImage&&
+null!=B.viewState.backgroundImage.originalSrc&&(O=new mxCodec(mxUtils.createXmlDocument()),O=O.encode(new mxGraphModel(B.root)),this.editor.graph.saveViewState(B.viewState,O,null,z),I=I.cloneNode(!1),mxUtils.setTextContent(I,Graph.compressNode(O))));e(I)}return t};EditorUi.prototype.anonymizeString=function(e,f){for(var k=[],z=0;z<e.length;z++){var t=e.charAt(z);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(f?"0":Math.round(9*Math.random()))}return k.join("")};EditorUi.prototype.anonymizePatch=function(e){if(null!=e[EditorUi.DIFF_INSERT])for(var f=0;f<e[EditorUi.DIFF_INSERT].length;f++)try{var k=mxUtils.parseXml(e[EditorUi.DIFF_INSERT][f].data).documentElement.cloneNode(!1);null!=k.getAttribute("name")&&k.setAttribute("name",this.anonymizeString(k.getAttribute("name")));
+e[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(k)}catch(B){e[EditorUi.DIFF_INSERT][f].data=B.message}if(null!=e[EditorUi.DIFF_UPDATE]){for(var z in e[EditorUi.DIFF_UPDATE]){var t=e[EditorUi.DIFF_UPDATE][z];null!=t.name&&(t.name=this.anonymizeString(t.name));null!=t.cells&&(f=mxUtils.bind(this,function(B){var I=t.cells[B];if(null!=I){for(var O in I)null!=I[O].value&&(I[O].value="["+I[O].value.length+"]"),null!=I[O].xmlValue&&(I[O].xmlValue="["+I[O].xmlValue.length+"]"),null!=I[O].style&&(I[O].style=
+"["+I[O].style.length+"]"),mxUtils.isEmptyObject(I[O])&&delete I[O];mxUtils.isEmptyObject(I)&&delete t.cells[B]}}),f(EditorUi.DIFF_INSERT),f(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(t.cells)&&delete t.cells);mxUtils.isEmptyObject(t)&&delete e[EditorUi.DIFF_UPDATE][z]}mxUtils.isEmptyObject(e[EditorUi.DIFF_UPDATE])&&delete e[EditorUi.DIFF_UPDATE]}return e};EditorUi.prototype.anonymizeAttributes=function(e,f){if(null!=e.attributes)for(var k=0;k<e.attributes.length;k++)"as"!=e.attributes[k].name&&
+e.setAttribute(e.attributes[k].name,this.anonymizeString(e.attributes[k].value,f));if(null!=e.childNodes)for(k=0;k<e.childNodes.length;k++)this.anonymizeAttributes(e.childNodes[k],f)};EditorUi.prototype.anonymizeNode=function(e,f){f=e.getElementsByTagName("mxCell");for(var k=0;k<f.length;k++)null!=f[k].getAttribute("value")&&f[k].setAttribute("value","["+f[k].getAttribute("value").length+"]"),null!=f[k].getAttribute("xmlValue")&&f[k].setAttribute("xmlValue","["+f[k].getAttribute("xmlValue").length+
+"]"),null!=f[k].getAttribute("style")&&f[k].setAttribute("style","["+f[k].getAttribute("style").length+"]"),null!=f[k].parentNode&&"root"!=f[k].parentNode.nodeName&&null!=f[k].parentNode.parentNode&&(f[k].setAttribute("id",f[k].parentNode.getAttribute("id")),f[k].parentNode.parentNode.replaceChild(f[k],f[k].parentNode));return e};EditorUi.prototype.synchronizeCurrentFile=function(e){var f=this.getCurrentFile();null!=f&&(f.savingFile?this.handleError({message:mxResources.get("busy")}):!e&&f.invalidChecksum?
+f.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(f.clearAutosave(),this.editor.setStatus(""),e?f.reloadFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(k){f.handleFileError(k,!0)})):f.synchronizeFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(k){f.handleFileError(k,!0)}))))};EditorUi.prototype.getFileData=function(e,f,k,z,t,B,I,
+O,J,y,ia){t=null!=t?t:!0;B=null!=B?B:!1;var da=this.editor.graph;if(f||!e&&null!=J&&/(\.svg)$/i.test(J.getTitle())){var ja=null!=da.themes&&"darkTheme"==da.defaultThemeName;y=!1;if(ja||null!=this.pages&&this.currentPage!=this.pages[0]){var aa=da.getGlobalVariable;da=this.createTemporaryGraph(ja?da.getDefaultStylesheet():da.getStylesheet());da.setBackgroundImage=this.editor.graph.setBackgroundImage;da.background=this.editor.graph.background;var qa=this.pages[0];this.currentPage==qa?da.setBackgroundImage(this.editor.graph.backgroundImage):
+null!=qa.viewState&&null!=qa.viewState&&da.setBackgroundImage(qa.viewState.backgroundImage);da.getGlobalVariable=function(sa){return"page"==sa?qa.getName():"pagenumber"==sa?1:aa.apply(this,arguments)};document.body.appendChild(da.container);da.model.setRoot(qa.root)}}I=null!=I?I:this.getXmlFileData(t,B,y,ia);J=null!=J?J:this.getCurrentFile();e=this.createFileData(I,da,J,window.location.href,e,f,k,z,t,O,y);da!=this.editor.graph&&da.container.parentNode.removeChild(da.container);return e};EditorUi.prototype.getHtml=
+function(e,f,k,z,t,B){B=null!=B?B:!0;var I=null,O=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){I=B?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var J=f.view.scale;B=Math.floor(I.x/J-f.view.translate.x);J=Math.floor(I.y/J-f.view.translate.y);I=f.background;null==t&&(f=this.getBasenames().join(";"),0<f.length&&(O=EditorUi.drawHost+"/embed.js?s="+f));e.setAttribute("x0",B);e.setAttribute("y0",J)}null!=e&&(e.setAttribute("pan","1"),e.setAttribute("zoom","1"),e.setAttribute("resize",
+"0"),e.setAttribute("fit","0"),e.setAttribute("border","20"),e.setAttribute("links","1"),null!=z&&e.setAttribute("edit",z));null!=t&&(t=t.replace(/&/g,"&amp;"));e=null!=e?Graph.zapGremlins(mxUtils.getXml(e)):"";z=Graph.compress(e);Graph.decompress(z)!=e&&(z=encodeURIComponent(e));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>diagrams.net</title>\n")+(null!=t?'<meta http-equiv="refresh" content="0;URL=\''+t+"'\"/>\n":"")+"</head>\n<body"+(null==t&&null!=I&&I!=mxConstants.NONE?' style="background-color:'+I+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+z+"</div>\n</div>\n"+(null==t?'<script type="text/javascript" src="'+O+'">\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(e,f,k,z,t){f=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=t&&(t=t.replace(/&/g,"&amp;"));e={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(e),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(e.page=mxUtils.indexOf(this.pages,this.currentPage));
+return(null==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>diagrams.net</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(e))+'"></div>\n'+(null==t?'<script type="text/javascript" src="'+f+'">\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(e){e=this.validateFileData(e);this.pages=this.fileNode=this.currentPage=null;var f=null!=e&&0<e.length?mxUtils.parseXml(e).documentElement:
+null,k=Editor.extractParserError(f,mxResources.get("invalidOrMissingFile"));if(k)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[e],"node",[f],"cause",[k]),Error(mxResources.get("notADiagramFile")+" ("+k+")");e=null!=f?this.editor.extractGraphModel(f,!0):null;null!=e&&(f=e);if(null!=f&&"mxfile"==f.nodeName&&(e=f.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<e.length||1==e.length&&e[0].hasAttribute("name"))){k=null;this.fileNode=f;this.pages=[];for(var z=0;z<e.length;z++)null==
+e[z].getAttribute("id")&&e[z].setAttribute("id",z),f=new DiagramPage(e[z]),null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[z+1])),this.pages.push(f),null!=urlParams["page-id"]&&f.getId()==urlParams["page-id"]&&(k=f);this.currentPage=null!=k?k:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];f=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=f&&(this.fileNode=f.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(f.ownerDocument.createElement("diagram")),
+this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(f);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var t=urlParams["layer-ids"].split(" ");f={};for(z=0;z<t.length;z++)f[t[z]]=!0;var B=this.editor.graph.getModel(),I=B.getChildren(B.root);for(z=0;z<I.length;z++){var O=I[z];B.setVisible(O,f[O.id]||!1)}}catch(J){}};EditorUi.prototype.getBaseFilename=function(e){var f=
+this.getCurrentFile();f=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(f)||/(\.html)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.png)$/i.test(f))f=f.substring(0,f.lastIndexOf("."));/(\.drawio)$/i.test(f)&&(f=f.substring(0,f.lastIndexOf(".")));!e&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(f=f+"-"+this.currentPage.getName());return f};EditorUi.prototype.downloadFile=
+function(e,f,k,z,t,B,I,O,J,y,ia,da){try{z=null!=z?z:this.editor.graph.isSelectionEmpty();var ja=this.getBaseFilename("remoteSvg"==e?!1:!t),aa=ja+("xml"==e||"pdf"==e&&ia?".drawio":"")+"."+e;if("xml"==e){var qa=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,z,t,null,null,null,f);this.saveData(aa,e,qa,"text/xml")}else if("html"==e)qa=this.getHtml2(this.getFileData(!0),this.editor.graph,ja),this.saveData(aa,e,qa,"text/html");else if("svg"!=e&&"xmlsvg"!=e||!this.spinner.spin(document.body,
+mxResources.get("export"))){if("xmlpng"==e)aa=ja+".png";else if("jpeg"==e)aa=ja+".jpg";else if("remoteSvg"==e){aa=ja+".svg";e="svg";var sa=parseInt(J);"string"===typeof O&&0<O.indexOf("%")&&(O=parseInt(O)/100);if(0<sa){var L=this.editor.graph,V=L.getGraphBounds();var T=Math.ceil(V.width*O/L.view.scale+2*sa);var Y=Math.ceil(V.height*O/L.view.scale+2*sa)}}this.saveRequest(aa,e,mxUtils.bind(this,function(S,ba){try{var U=this.editor.graph.pageVisible;0==B&&(this.editor.graph.pageVisible=B);var ca=this.createDownloadRequest(S,
+e,z,ba,I,t,O,J,y,ia,da,T,Y);this.editor.graph.pageVisible=U;return ca}catch(ea){this.handleError(ea)}}))}else{var W=null,ka=mxUtils.bind(this,function(S){S.length<=MAX_REQUEST_SIZE?this.saveData(aa,"svg",S,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(W)}))});if("svg"==e){var q=this.editor.graph.background;if(I||q==mxConstants.NONE)q=null;var F=this.editor.graph.getSvg(q,null,null,null,null,z);k&&
+this.editor.graph.addSvgShadow(F);this.editor.convertImages(F,mxUtils.bind(this,mxUtils.bind(this,function(S){this.spinner.stop();ka(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(S))})))}else aa=ja+".svg",W=this.getFileData(!1,!0,null,mxUtils.bind(this,function(S){this.spinner.stop();ka(S)}),z)}}catch(S){this.handleError(S)}};EditorUi.prototype.createDownloadRequest=function(e,f,k,z,t,B,I,O,J,y,ia,da,ja){var aa=this.editor.graph,qa=aa.getGraphBounds();k=this.getFileData(!0,null,null,
+null,k,0==B?!1:"xmlpng"!=f,null,null,null,!1,"pdf"==f);var sa="",L="";if(qa.width*qa.height>MAX_AREA||k.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};y=y?"1":"0";"pdf"==f&&(null!=ia?L="&from="+ia.from+"&to="+ia.to:0==B&&(L="&allPages=1"));"xmlpng"==f&&(y="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(B=0;B<this.pages.length;B++)if(this.pages[B]==this.currentPage){sa="&from="+B;break}B=aa.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!t?
+t||null!=B&&B!=mxConstants.NONE||(B="#ffffff"):B=mxConstants.NONE;t={globalVars:aa.getExportVariables()};J&&(t.grid={size:aa.gridSize,steps:aa.view.gridSteps,color:aa.view.gridColor});Graph.translateDiagram&&(t.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+f+sa+L+"&bg="+(null!=B?B:mxConstants.NONE)+"&base64="+z+"&embedXml="+y+"&xml="+encodeURIComponent(k)+(null!=e?"&filename="+encodeURIComponent(e):"")+"&extras="+encodeURIComponent(JSON.stringify(t))+(null!=I?
+"&scale="+I:"")+(null!=O?"&border="+O:"")+(da&&isFinite(da)?"&w="+da:"")+(ja&&isFinite(ja)?"&h="+ja:""))};EditorUi.prototype.setMode=function(e,f){this.mode=e};EditorUi.prototype.loadDescriptor=function(e,f,k){var z=window.location.hash,t=mxUtils.bind(this,function(I){var O=null!=e.data?e.data:"";null!=I&&0<I.length&&(0<O.length&&(O+="\n"),O+=I);I=new LocalFile(this,"csv"!=e.format&&0<O.length?O:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);
+I.getHash=function(){return z};this.fileLoaded(I);"csv"==e.format&&this.importCsv(O,mxUtils.bind(this,function(ja){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=e.update){var J=null!=e.interval?parseInt(e.interval):6E4,y=null,ia=mxUtils.bind(this,function(){var ja=this.currentPage;mxUtils.post(e.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(aa){ja===this.currentPage&&(200<=aa.getStatus()&&
+300>=aa.getStatus()?(this.updateDiagram(aa.getText()),da()):this.handleError({message:mxResources.get("error")+" "+aa.getStatus()}))}),mxUtils.bind(this,function(aa){this.handleError(aa)}))}),da=mxUtils.bind(this,function(){window.clearTimeout(y);y=window.setTimeout(ia,J)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){da();ia()}));da();ia()}null!=f&&f()});if(null!=e.url&&0<e.url.length){var B=this.editor.getProxiedUrl(e.url);this.editor.loadUrl(B,mxUtils.bind(this,function(I){t(I)}),
+mxUtils.bind(this,function(I){null!=k&&k(I)}))}else t("")};EditorUi.prototype.updateDiagram=function(e){function f(Y){var W=new mxCellOverlay(Y.image||t.warningImage,Y.tooltip,Y.align,Y.valign,Y.offset);W.addListener(mxEvent.CLICK,function(ka,q){z.alert(Y.tooltip)});return W}var k=null,z=this;if(null!=e&&0<e.length&&(k=mxUtils.parseXml(e),e=null!=k?k.documentElement:null,null!=e&&"updates"==e.nodeName)){var t=this.editor.graph,B=t.getModel();B.beginUpdate();var I=null;try{for(e=e.firstChild;null!=
+e;){if("update"==e.nodeName){var O=B.getCell(e.getAttribute("id"));if(null!=O){try{var J=e.getAttribute("value");if(null!=J){var y=mxUtils.parseXml(J).documentElement;if(null!=y)if("1"==y.getAttribute("replace-value"))B.setValue(O,y);else for(var ia=y.attributes,da=0;da<ia.length;da++)t.setAttributeForCell(O,ia[da].nodeName,0<ia[da].nodeValue.length?ia[da].nodeValue:null)}}catch(Y){null!=window.console&&console.log("Error in value for "+O.id+": "+Y)}try{var ja=e.getAttribute("style");null!=ja&&t.model.setStyle(O,
+ja)}catch(Y){null!=window.console&&console.log("Error in style for "+O.id+": "+Y)}try{var aa=e.getAttribute("icon");if(null!=aa){var qa=0<aa.length?JSON.parse(aa):null;null!=qa&&qa.append||t.removeCellOverlays(O);null!=qa&&t.addCellOverlay(O,f(qa))}}catch(Y){null!=window.console&&console.log("Error in icon for "+O.id+": "+Y)}try{var sa=e.getAttribute("geometry");if(null!=sa){sa=JSON.parse(sa);var L=t.getCellGeometry(O);if(null!=L){L=L.clone();for(key in sa){var V=parseFloat(sa[key]);"dx"==key?L.x+=
+V:"dy"==key?L.y+=V:"dw"==key?L.width+=V:"dh"==key?L.height+=V:L[key]=parseFloat(sa[key])}t.model.setGeometry(O,L)}}}catch(Y){null!=window.console&&console.log("Error in icon for "+O.id+": "+Y)}}}else if("model"==e.nodeName){for(var T=e.firstChild;null!=T&&T.nodeType!=mxConstants.NODETYPE_ELEMENT;)T=T.nextSibling;null!=T&&(new mxCodec(e.firstChild)).decode(T,B)}else if("view"==e.nodeName){if(e.hasAttribute("scale")&&(t.view.scale=parseFloat(e.getAttribute("scale"))),e.hasAttribute("dx")||e.hasAttribute("dy"))t.view.translate=
+new mxPoint(parseFloat(e.getAttribute("dx")||0),parseFloat(e.getAttribute("dy")||0))}else"fit"==e.nodeName&&(I=e.hasAttribute("max-scale")?parseFloat(e.getAttribute("max-scale")):1);e=e.nextSibling}}finally{B.endUpdate()}null!=I&&this.chromelessResize&&this.chromelessResize(!0,I)}return k};EditorUi.prototype.getCopyFilename=function(e,f){var k=null!=e&&null!=e.getTitle()?e.getTitle():this.defaultFilename;e="";var z=k.lastIndexOf(".");0<=z&&(e=k.substring(z),k=k.substring(0,z));if(f){f=k;var t=new Date;
+k=t.getFullYear();z=t.getMonth()+1;var B=t.getDate(),I=t.getHours(),O=t.getMinutes();t=t.getSeconds();k=f+(" "+(k+"-"+z+"-"+B+"-"+I+"-"+O+"-"+t))}return k=mxResources.get("copyOf",[k])+e};EditorUi.prototype.fileLoaded=function(e,f){var k=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var z=!1;this.hideDialog();null!=k&&(EditorUi.debug("File.closed",[k]),k.removeListener(this.descriptorChangedListener),k.close());this.editor.graph.model.clear();this.editor.undoManager.clear();
+var t=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=k&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!f&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerText="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();f||this.showSplash()});
+if(null!=e)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(e);e.addListener("descriptorChanged",this.descriptorChangedListener);e.addListener("contentChanged",this.descriptorChangedListener);e.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(e.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();e.isEditable()?e.isModified()?(e.addUnsavedStatus(),
+null!=e.backupPatch&&e.patch([e.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));
+z=!0;if(!this.isOffline()&&null!=e.getMode()){var B="1"==urlParams.sketch?"sketch":uiTheme;if(null==B)B="default";else if("sketch"==B||"min"==B)B+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:e.getMode().toUpperCase()+"-OPEN-FILE-"+e.getHash(),action:"size_"+e.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+B})}EditorUi.debug("File.opened",[e]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==
+e.getMode()&&e.getMode()!=App.MODE_DEVICE&&null!=e.getMode())try{this.addRecent({id:e.getHash(),title:e.getTitle(),mode:e.getMode()})}catch(I){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(I){}}catch(I){this.fileLoadedError=I;if(null!=e)try{e.close()}catch(O){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=e?e.getHash():"none"),action:"message_"+I.message,label:"stack_"+I.stack})}catch(O){}e=mxUtils.bind(this,
+function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=k?this.fileLoaded(k)||t():t()});f?e():this.handleError(I,mxResources.get("errorLoadingFile"),e,!0,null,null,!0)}else t();return z};EditorUi.prototype.getHashValueForPages=function(e,f){var k=0,z=new mxGraphModel,t=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var B=0;B<e.length;B++){this.updatePageRoot(e[B]);var I=
+e[B].node.cloneNode(!1);I.removeAttribute("name");z.root=e[B].root;var O=t.encode(z);this.editor.graph.saveViewState(e[B].viewState,O,!0);O.removeAttribute("pageWidth");O.removeAttribute("pageHeight");I.appendChild(O);null!=f&&(f.eltCount+=I.getElementsByTagName("*").length,f.nodeCount+=I.getElementsByTagName("mxCell").length);k=(k<<5)-k+this.hashValue(I,function(J,y,ia,da){return!da||"mxGeometry"!=J.nodeName&&"mxPoint"!=J.nodeName||"x"!=y&&"y"!=y&&"width"!=y&&"height"!=y?da&&"mxCell"==J.nodeName&&
+"previous"==y?null:ia:Math.round(ia)},f)<<0}return k};EditorUi.prototype.hashValue=function(e,f,k){var z=0;if(null!=e&&"object"===typeof e&&"number"===typeof e.nodeType&&"string"===typeof e.nodeName&&"function"===typeof e.getAttribute){null!=e.nodeName&&(z^=this.hashValue(e.nodeName,f,k));if(null!=e.attributes){null!=k&&(k.attrCount+=e.attributes.length);for(var t=0;t<e.attributes.length;t++){var B=e.attributes[t].name,I=null!=f?f(e,B,e.attributes[t].value,!0):e.attributes[t].value;null!=I&&(z^=this.hashValue(B,
+f,k)+this.hashValue(I,f,k))}}if(null!=e.childNodes)for(t=0;t<e.childNodes.length;t++)z=(z<<5)-z+this.hashValue(e.childNodes[t],f,k)<<0}else if(null!=e&&"function"!==typeof e){e=String(e);f=0;null!=k&&(k.byteCount+=e.length);for(t=0;t<e.length;t++)f=(f<<5)-f+e.charCodeAt(t)<<0;z^=f}return z};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(e,f,k,z,t,B,I){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||
+mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(e){null==e&&(e=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,e,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(e){var f=mxUtils.createXmlDocument(),k=f.createElement("mxlibrary");mxUtils.setTextContent(k,JSON.stringify(e));f.appendChild(k);
+return mxUtils.getXml(f)};EditorUi.prototype.closeLibrary=function(e){null!=e&&(this.removeLibrarySidebar(e.getHash()),e.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(e.getHash()),".scratchpad"==e.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(e){var f=this.sidebar.palettes[e];if(null!=f){for(var k=0;k<f.length;k++)f[k].parentNode.removeChild(f[k]);delete this.sidebar.palettes[e]}};EditorUi.prototype.repositionLibrary=function(e){var f=this.sidebar.container;
+if(null==e){var k=this.sidebar.palettes["L.scratchpad"];null==k&&(k=this.sidebar.palettes.search);null!=k&&(e=k[k.length-1].nextSibling)}e=null!=e?e:f.firstChild.nextSibling.nextSibling;k=f.lastChild;var z=k.previousSibling;f.insertBefore(k,e);f.insertBefore(z,k)};EditorUi.prototype.loadLibrary=function(e,f){var k=mxUtils.parseXml(e.getData());if("mxlibrary"==k.documentElement.nodeName){var z=JSON.parse(mxUtils.getTextContent(k.documentElement));this.libraryLoaded(e,z,k.documentElement.getAttribute("title"),
+f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(e){return""};EditorUi.prototype.libraryLoaded=function(e,f,k,z){if(null!=this.sidebar){e.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(e.getHash());".scratchpad"==e.title&&(this.scratchpad=e);var t=this.sidebar.palettes[e.getHash()];t=null!=t?t[t.length-1].nextSibling:null;this.removeLibrarySidebar(e.getHash());var B=null,I=mxUtils.bind(this,function(T,Y){0==T.length&&e.isEditable()?
+(null==B&&(B=document.createElement("div"),B.className="geDropTarget",mxUtils.write(B,mxResources.get("dragElementsHere"))),Y.appendChild(B)):this.addLibraryEntries(T,Y)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==k&&(k=e.getTitle(),null!=k&&/(\.xml)$/i.test(k)&&(k=k.substring(0,k.lastIndexOf("."))));var O=this.sidebar.addPalette(e.getHash(),k,null!=z?z:!0,mxUtils.bind(this,function(T){I(f,T)}));this.repositionLibrary(t);var J=O.parentNode.previousSibling;z=J.getAttribute("title");
+null!=z&&0<z.length&&".scratchpad"!=e.title&&J.setAttribute("title",this.getLibraryStorageHint(e)+"\n"+z);var y=document.createElement("div");y.style.position="absolute";y.style.right="0px";y.style.top="0px";y.style.padding="8px";y.style.backgroundColor="inherit";J.style.position="relative";var ia=document.createElement("img");ia.className="geAdaptiveAsset";ia.setAttribute("src",Editor.crossImage);ia.setAttribute("title",mxResources.get("close"));ia.setAttribute("valign","absmiddle");ia.setAttribute("border",
+"0");ia.style.position="relative";ia.style.top="2px";ia.style.width="14px";ia.style.cursor="pointer";ia.style.margin="0 3px";var da=null;if(".scratchpad"!=e.title||this.closableScratchpad)y.appendChild(ia),mxEvent.addListener(ia,"click",mxUtils.bind(this,function(T){if(!mxEvent.isConsumed(T)){var Y=mxUtils.bind(this,function(){this.closeLibrary(e)});null!=da?this.confirm(mxResources.get("allChangesLost"),null,Y,mxResources.get("cancel"),mxResources.get("discardChanges")):Y();mxEvent.consume(T)}}));
+if(e.isEditable()){var ja=this.editor.graph,aa=null,qa=mxUtils.bind(this,function(T){this.showLibraryDialog(e.getTitle(),O,f,e,e.getMode());mxEvent.consume(T)}),sa=mxUtils.bind(this,function(T){e.setModified(!0);e.isAutosave()?(null!=aa&&null!=aa.parentNode&&aa.parentNode.removeChild(aa),aa=ia.cloneNode(!1),aa.setAttribute("src",Editor.spinImage),aa.setAttribute("title",mxResources.get("saving")),aa.style.cursor="default",aa.style.marginRight="2px",aa.style.marginTop="-2px",y.insertBefore(aa,y.firstChild),
+J.style.paddingRight=18*y.childNodes.length+"px",this.saveLibrary(e.getTitle(),f,e,e.getMode(),!0,!0,function(){null!=aa&&null!=aa.parentNode&&(aa.parentNode.removeChild(aa),J.style.paddingRight=18*y.childNodes.length+"px")})):null==da&&(da=ia.cloneNode(!1),da.setAttribute("src",Editor.saveImage),da.setAttribute("title",mxResources.get("save")),y.insertBefore(da,y.firstChild),mxEvent.addListener(da,"click",mxUtils.bind(this,function(Y){this.saveLibrary(e.getTitle(),f,e,e.getMode(),e.constructor==
+LocalLibrary,!0,function(){null==da||e.isModified()||(J.style.paddingRight=18*y.childNodes.length+"px",da.parentNode.removeChild(da),da=null)});mxEvent.consume(Y)})),J.style.paddingRight=18*y.childNodes.length+"px")}),L=mxUtils.bind(this,function(T,Y,W,ka){T=ja.cloneCells(mxUtils.sortCells(ja.model.getTopmostCells(T)));for(var q=0;q<T.length;q++){var F=ja.getCellGeometry(T[q]);null!=F&&F.translate(-Y.x,-Y.y)}O.appendChild(this.sidebar.createVertexTemplateFromCells(T,Y.width,Y.height,ka||"",!0,null,
+!1));T={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(T))),w:Y.width,h:Y.height};null!=ka&&(T.title=ka);f.push(T);sa(W);null!=B&&null!=B.parentNode&&0<f.length&&(B.parentNode.removeChild(B),B=null)}),V=mxUtils.bind(this,function(T){if(ja.isSelectionEmpty())ja.getRubberband().isActive()?(ja.getRubberband().execute(T),ja.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var Y=ja.getSelectionCells(),W=ja.view.getBounds(Y),
+ka=ja.view.scale;W.x/=ka;W.y/=ka;W.width/=ka;W.height/=ka;W.x-=ja.view.translate.x;W.y-=ja.view.translate.y;L(Y,W)}mxEvent.consume(T)});mxEvent.addGestureListeners(O,function(){},mxUtils.bind(this,function(T){ja.isMouseDown&&null!=ja.panningManager&&null!=ja.graphHandler.first&&(ja.graphHandler.suspend(),null!=ja.graphHandler.hint&&(ja.graphHandler.hint.style.visibility="hidden"),O.style.backgroundColor="#f1f3f4",O.style.cursor="copy",ja.panningManager.stop(),ja.autoScroll=!1,mxEvent.consume(T))}),
+mxUtils.bind(this,function(T){ja.isMouseDown&&null!=ja.panningManager&&null!=ja.graphHandler&&(O.style.backgroundColor="",O.style.cursor="default",this.sidebar.showTooltips=!0,ja.panningManager.stop(),ja.graphHandler.reset(),ja.isMouseDown=!1,ja.autoScroll=!0,V(T),mxEvent.consume(T))}));mxEvent.addListener(O,"mouseleave",mxUtils.bind(this,function(T){ja.isMouseDown&&null!=ja.graphHandler.first&&(ja.graphHandler.resume(),null!=ja.graphHandler.hint&&(ja.graphHandler.hint.style.visibility="visible"),
+O.style.backgroundColor="",O.style.cursor="",ja.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(O,"dragover",mxUtils.bind(this,function(T){O.style.backgroundColor="#f1f3f4";T.dataTransfer.dropEffect="copy";O.style.cursor="copy";this.sidebar.hideTooltip();T.stopPropagation();T.preventDefault()})),mxEvent.addListener(O,"drop",mxUtils.bind(this,function(T){O.style.cursor="";O.style.backgroundColor="";0<T.dataTransfer.files.length&&this.importFiles(T.dataTransfer.files,0,0,this.maxImageSize,
+mxUtils.bind(this,function(Y,W,ka,q,F,S,ba,U,ca){if(null!=Y&&"image/"==W.substring(0,6))Y="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(Y),Y=[new mxCell("",new mxGeometry(0,0,F,S),Y)],Y[0].vertex=!0,L(Y,new mxRectangle(0,0,F,S),T,mxEvent.isAltDown(T)?null:ba.substring(0,ba.lastIndexOf(".")).replace(/_/g," ")),null!=B&&null!=B.parentNode&&0<f.length&&(B.parentNode.removeChild(B),B=null);else{var ea=!1,na=mxUtils.bind(this,function(ra,
+ya){null!=ra&&"application/pdf"==ya&&(ya=Editor.extractGraphModelFromPdf(ra),null!=ya&&0<ya.length&&(ra=ya));if(null!=ra)if(ra=mxUtils.parseXml(ra),"mxlibrary"==ra.documentElement.nodeName)try{var va=JSON.parse(mxUtils.getTextContent(ra.documentElement));I(va,O);f=f.concat(va);sa(T);this.spinner.stop();ea=!0}catch(xa){}else if("mxfile"==ra.documentElement.nodeName)try{var Da=ra.documentElement.getElementsByTagName("diagram");for(va=0;va<Da.length;va++){var pa=this.stringToCells(Editor.getDiagramNodeXml(Da[va])),
+Aa=this.editor.graph.getBoundingBoxFromGeometry(pa);L(pa,new mxRectangle(0,0,Aa.width,Aa.height),T)}ea=!0}catch(xa){null!=window.console&&console.log("error in drop handler:",xa)}ea||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=B&&null!=B.parentNode&&0<f.length&&(B.parentNode.removeChild(B),B=null)});null!=ca&&null!=ba&&(/(\.v(dx|sdx?))($|\?)/i.test(ba)||/(\.vs(x|sx?))($|\?)/i.test(ba))?this.importVisio(ca,function(ra){na(ra,"text/xml")},null,ba):(new XMLHttpRequest).upload&&
+this.isRemoteFileFormat(Y,ba)&&null!=ca?this.isExternalDataComms()?this.parseFile(ca,mxUtils.bind(this,function(ra){4==ra.readyState&&(this.spinner.stop(),200<=ra.status&&299>=ra.status?na(ra.responseText,"text/xml"):this.handleError({message:mxResources.get(413==ra.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):na(Y,W)}}));T.stopPropagation();T.preventDefault()})),
+mxEvent.addListener(O,"dragleave",function(T){O.style.cursor="";O.style.backgroundColor="";T.stopPropagation();T.preventDefault()}));ia=ia.cloneNode(!1);ia.setAttribute("src",Editor.editImage);ia.setAttribute("title",mxResources.get("edit"));y.insertBefore(ia,y.firstChild);mxEvent.addListener(ia,"click",qa);mxEvent.addListener(O,"dblclick",function(T){mxEvent.getSource(T)==O&&qa(T)});z=ia.cloneNode(!1);z.setAttribute("src",Editor.plusImage);z.setAttribute("title",mxResources.get("add"));y.insertBefore(z,
+y.firstChild);mxEvent.addListener(z,"click",V);this.isOffline()||".scratchpad"!=e.title||null==EditorUi.scratchpadHelpLink||(z=document.createElement("span"),z.setAttribute("title",mxResources.get("help")),z.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(z,"?"),mxEvent.addGestureListeners(z,mxUtils.bind(this,function(T){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(T)})),y.insertBefore(z,y.firstChild))}J.appendChild(y);J.style.paddingRight=
+18*y.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(e,f){for(var k=0;k<e.length;k++){var z=e[k],t=z.data;if(null!=t){t=this.convertDataUri(t);var B="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==z.aspect&&(B+="aspect=fixed;");f.appendChild(this.sidebar.createVertexTemplate(B+"image="+t,z.w,z.h,"",z.title||"",!1,null,!0))}else null!=z.xml&&(t=this.stringToCells(Graph.decompress(z.xml)),0<t.length&&f.appendChild(this.sidebar.createVertexTemplateFromCells(t,
+z.w,z.h,z.title||"",!0,null,!0)))}};EditorUi.prototype.getResource=function(e){return null!=e?e[mxLanguage]||e.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground=
+"rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):Editor.isDarkMode()&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor=Editor.darkColor,Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.shapeBackgroundColor=Editor.darkColor,Graph.prototype.shapeForegroundColor=Editor.lightColor,Graph.prototype.defaultPageBackgroundColor=Editor.darkColor,Graph.prototype.defaultPageBorderColor=
+"#505759",BaseFormatPanel.prototype.buttonBackgroundColor=Editor.darkColor,mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00");"1"==urlParams.sketch&&("undefined"!==typeof Menus&&(Menus.prototype.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts)),Graph.prototype.defaultVertexStyle={hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",
+orthogonalLoop:"1",endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8"},Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled="1"==urlParams.grid,Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};"1"!=urlParams["live-ui"]&&EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(e,f,k,
+z,t,B,I){e=new ImageDialog(this,e,f,k,z,t,B,I);this.showDialog(e.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);e.init()};EditorUi.prototype.showBackgroundImageDialog=function(e,f){e=null!=e?e:mxUtils.bind(this,function(k,z){z||(k=new ChangePageSetup(this,null,k),k.ignoreColor=!0,this.editor.graph.model.execute(k))});e=new BackgroundImageDialog(this,e,f);this.showDialog(e.container,400,200,!0,!0);e.init()};EditorUi.prototype.showLibraryDialog=function(e,f,k,z,t){e=new LibraryDialog(this,
+e,f,k,z,t);this.showDialog(e.container,640,440,!0,!1,mxUtils.bind(this,function(B){B&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));e.init()};var g=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(e){var f=g.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(k){this.editor.graph.isSelectionEmpty()&&f.refresh()}));return f};EditorUi.prototype.createSidebarFooterContainer=function(){var e=this.createDiv("geSidebarContainer geSidebarFooter");
+e.style.position="absolute";e.style.overflow="hidden";var f=document.createElement("a");f.className="geTitle";f.style.color="#DF6C0C";f.style.fontWeight="bold";f.style.height="100%";f.style.paddingTop="9px";f.innerHTML="<span>+</span>";var k=f.getElementsByTagName("span")[0];k.style.fontSize="18px";k.style.marginRight="5px";mxUtils.write(f,mxResources.get("moreShapes")+"...");mxEvent.addListener(f,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(z){z.preventDefault()}));mxEvent.addListener(f,
+"click",mxUtils.bind(this,function(z){this.actions.get("shapes").funct();mxEvent.consume(z)}));e.appendChild(f);return e};EditorUi.prototype.handleError=function(e,f,k,z,t,B,I){var O=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},J=null!=e&&null!=e.error?e.error:e;if(null!=e&&("1"==urlParams.test||null!=e.stack)&&null!=e.message)try{I?null!=window.console&&console.error("EditorUi.handleError:",e):EditorUi.logError("Caught: "+(""==e.message&&null!=e.name)?e.name:e.message,
+e.filename,e.lineNumber,e.columnNumber,e,"INFO")}catch(aa){}if(null!=J||null!=f){I=mxUtils.htmlEntities(mxResources.get("unknownError"));var y=mxResources.get("ok"),ia=null;f=null!=f?f:mxResources.get("error");if(null!=J){null!=J.retry&&(y=mxResources.get("cancel"),ia=function(){O();J.retry()});if(404==J.code||404==J.status||403==J.code){I=403==J.code?null!=J.message?mxUtils.htmlEntities(J.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=t?t:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+
+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var da=null!=t?null:null!=B?B:window.location.hash;if(null!=da&&("#G"==da.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==da.substring(0,45))&&(null!=e&&null!=e.error&&(null!=e.error.errors&&0<e.error.errors.length&&"fileAccess"==e.error.errors[0].reason||null!=e.error.data&&0<e.error.data.length&&"fileAccess"==e.error.data[0].reason)||404==J.code||404==J.status)){da="#U"==
+da.substring(0,2)?da.substring(45,da.lastIndexOf("%26ex")):da.substring(2);this.showError(f,I,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+da);this.handleError(e,f,k,z,t)}),ia,mxResources.get("changeUser"),mxUtils.bind(this,function(){function aa(){V.innerText="";for(var T=0;T<qa.length;T++){var Y=document.createElement("option");mxUtils.write(Y,qa[T].displayName);Y.value=T;V.appendChild(Y);Y=document.createElement("option");
+Y.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(Y,"<"+qa[T].email+">");Y.setAttribute("disabled","disabled");V.appendChild(Y)}Y=document.createElement("option");mxUtils.write(Y,mxResources.get("addAccount"));Y.value=qa.length;V.appendChild(Y)}var qa=this.drive.getUsersList(),sa=document.createElement("div"),L=document.createElement("span");L.style.marginTop="6px";mxUtils.write(L,mxResources.get("changeUser")+": ");sa.appendChild(L);var V=document.createElement("select");V.style.width="200px";aa();
+mxEvent.addListener(V,"change",mxUtils.bind(this,function(){var T=V.value,Y=qa.length!=T;Y&&this.drive.setUser(qa[T]);this.drive.authorize(Y,mxUtils.bind(this,function(){Y||(qa=this.drive.getUsersList(),aa())}),mxUtils.bind(this,function(W){this.handleError(W)}),!0)}));sa.appendChild(V);sa=new CustomDialog(this,sa,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(sa.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();
+null!=k&&k()}),480,150);return}}null!=J.message?I=""==J.message&&null!=J.name?mxUtils.htmlEntities(J.name):mxUtils.htmlEntities(J.message):null!=J.response&&null!=J.response.error?I=mxUtils.htmlEntities(J.response.error):"undefined"!==typeof window.App&&(J.code==App.ERROR_TIMEOUT?I=mxUtils.htmlEntities(mxResources.get("timeout")):J.code==App.ERROR_BUSY?I=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof J&&0<J.length&&(I=mxUtils.htmlEntities(J)))}var ja=B=null;null!=J&&null!=J.helpLink?
+(B=mxResources.get("help"),ja=mxUtils.bind(this,function(){return this.editor.graph.openLink(J.helpLink)})):null!=J&&null!=J.ownerEmail&&(B=mxResources.get("contactOwner"),I+=mxUtils.htmlEntities(" ("+B+": "+J.ownerEmail+")"),ja=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(J.ownerEmail))}));this.showError(f,I,y,k,ia,null,null,B,ja,null,null,null,z?k:null)}else null!=k&&k()};EditorUi.prototype.alert=function(e,f,k){e=new ErrorDialog(this,null,e,mxResources.get("ok"),
+f);this.showDialog(e.container,k||340,100,!0,!1);e.init()};EditorUi.prototype.confirm=function(e,f,k,z,t,B){var I=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},O=Math.min(200,28*Math.ceil(e.length/50));e=new ConfirmDialog(this,e,function(){I();null!=f&&f()},function(){I();null!=k&&k()},z,t,null,null,null,null,O);this.showDialog(e.container,340,46+O,!0,B);e.init()};EditorUi.prototype.showBanner=function(e,f,k,z){var t=!1;if(!(this.bannerShowing||this["hideBanner"+e]||
+isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+e])){var B=document.createElement("div");B.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(B.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(B.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(B.style,"transition",
+"all 1s ease");B.className="geBtn gePrimaryBtn";t=document.createElement("img");t.setAttribute("src",IMAGE_PATH+"/logo.png");t.setAttribute("border","0");t.setAttribute("align","absmiddle");t.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";B.appendChild(t);t=document.createElement("img");t.setAttribute("src",Dialog.prototype.closeImage);t.setAttribute("title",mxResources.get(z?"doNotShowAgain":"close"));t.setAttribute("border","0");t.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";
+B.appendChild(t);mxUtils.write(B,f);document.body.appendChild(B);this.bannerShowing=!0;f=document.createElement("div");f.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var I=document.createElement("input");I.setAttribute("type","checkbox");I.setAttribute("id","geDoNotShowAgainCheckbox");I.style.marginRight="6px";if(!z){f.appendChild(I);var O=document.createElement("label");O.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(O,mxResources.get("doNotShowAgain"));f.appendChild(O);
+B.style.paddingBottom="30px";B.appendChild(f)}var J=mxUtils.bind(this,function(){null!=B.parentNode&&(B.parentNode.removeChild(B),this.bannerShowing=!1,I.checked||z)&&(this["hideBanner"+e]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+e]=Date.now(),mxSettings.save()))});mxEvent.addListener(t,"click",mxUtils.bind(this,function(ia){mxEvent.consume(ia);J()}));var y=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(B.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,
+function(){J()}),1E3)});mxEvent.addListener(B,"click",mxUtils.bind(this,function(ia){var da=mxEvent.getSource(ia);da!=I&&da!=O?(null!=k&&k(),J(),mxEvent.consume(ia)):y()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(B.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(y,3E4);t=!0}return t};EditorUi.prototype.setCurrentFile=function(e){null!=e&&(e.opened=new Date);this.currentFile=e};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=
+function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(e,f,k,z){e=e.toDataURL("image/"+k);if(null!=e&&6<e.length)null!=f&&(e=Editor.writeGraphModelToPng(e,"tEXt","mxfile",encodeURIComponent(f))),0<z&&(e=Editor.writeGraphModelToPng(e,"pHYs","dpi",z));else throw{message:mxResources.get("unknownError")};return e};EditorUi.prototype.saveCanvas=function(e,f,k,z,t){var B="jpeg"==k?"jpg":k;z=this.getBaseFilename(z)+(null!=f?".drawio":"")+"."+B;e=this.createImageDataUri(e,
+f,k,t);this.saveData(z,B,e.substring(e.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(e,f){e=new TextareaDialog(this,e,f,null,null,mxResources.get("close"));this.showDialog(e.container,620,460,
+!0,!0,null,null,null,null,!0);e.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(e,f,k,z,t,B){"text/xml"!=k||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.html)$/i.test(f)||(f=f+"."+(null!=B?B:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)e=z?this.base64ToBlob(e,k):new Blob([e],{type:k}),navigator.msSaveOrOpenBlob(e,f);else if(mxClient.IS_IE)k=window.open("about:blank","_blank"),null==k?mxUtils.popup(e,!0):(k.document.write(e),
+k.document.close(),k.document.execCommand("SaveAs",!0,f),k.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==k||"image/"!=k.substring(0,6)?this.showTextDialog(f+":",e):this.openInNewWindow(e,k,z);else{var I=document.createElement("a");B=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof I.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var O=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);B=65==(O?parseInt(O[2],10):
+!1)?!1:B}if(B||this.isOffline()){I.href=URL.createObjectURL(z?this.base64ToBlob(e,k):new Blob([e],{type:k}));B?I.download=f:I.setAttribute("target","_blank");document.body.appendChild(I);try{window.setTimeout(function(){URL.revokeObjectURL(I.href)},2E4),I.click(),I.parentNode.removeChild(I)}catch(J){}}else this.createEchoRequest(e,f,k,z,t).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(e,f,k,z,t,B){e="xml="+encodeURIComponent(e);return new mxXmlRequest(SAVE_URL,e+(null!=
+k?"&mime="+k:"")+(null!=t?"&format="+t:"")+(null!=B?"&base64="+B:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(z?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(e,f){f=f||"";e=atob(e);for(var k=e.length,z=Math.ceil(k/1024),t=Array(z),B=0;B<z;++B){for(var I=1024*B,O=Math.min(I+1024,k),J=Array(O-I),y=0;I<O;++y,++I)J[y]=e[I].charCodeAt(0);t[B]=new Uint8Array(J)}return new Blob(t,{type:f})};EditorUi.prototype.saveLocalFile=function(e,f,k,z,t,B,I,O){B=null!=B?B:!1;I=null!=I?I:"vsdx"!=
+t&&(!mxClient.IS_IOS||!navigator.standalone);t=this.getServiceCount(B);isLocalStorage&&t++;var J=4>=t?2:6<t?4:3;f=new CreateDialog(this,f,mxUtils.bind(this,function(y,ia){try{if("_blank"==ia)if(null!=k&&"image/"==k.substring(0,6))this.openInNewWindow(e,k,z);else if(null!=k&&"text/html"==k.substring(0,9)){var da=new EmbedDialog(this,e);this.showDialog(da.container,450,240,!0,!0);da.init()}else{var ja=window.open("about:blank");null==ja?mxUtils.popup(e,!0):(ja.document.write("<pre>"+mxUtils.htmlEntities(e,
+!1)+"</pre>"),ja.document.close())}else ia==App.MODE_DEVICE||"download"==ia?this.doSaveLocalFile(e,y,k,z,null,O):null!=y&&0<y.length&&this.pickFolder(ia,mxUtils.bind(this,function(aa){try{this.exportFile(e,y,k,z,ia,aa)}catch(qa){this.handleError(qa)}}))}catch(aa){this.handleError(aa)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,B,I,null,1<t,J,e,k,z);B=this.isServices(t)?t>J?390:280:160;this.showDialog(f.container,420,B,!0,!0);f.init()};
+EditorUi.prototype.openInNewWindow=function(e,f,k){var z=window.open("about:blank");null==z||null==z.document?mxUtils.popup(e,!0):("image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"!=f||k?(e=k?e:btoa(unescape(encodeURIComponent(e))),z.document.write('<html><img style="max-width:100%;" src="data:'+f+";base64,"+e+'"/></html>')):z.document.write("<html>"+e+"</html>"):z.document.write("<html><pre>"+mxUtils.htmlEntities(e,!1)+"</pre></html>"),z.document.close())};var l=EditorUi.prototype.addChromelessToolbarItems;
+EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(e){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var f=e(mxUtils.bind(this,function(z){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=f.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(z)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var z=this.editor.graph.getAllTags();f.style.display=0<z.length?"":"none"}))}l.apply(this,arguments);this.editor.addListener("tagsDialogShown",mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=
+null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,
+"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var k=e(mxUtils.bind(this,function(z){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 B=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,70);this.exportDialog.style.left=B.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";B=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=B.zIndex;var I=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",
+speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});I.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(O){I.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var J=this.createImageDataUri(O,null,"png");O=document.createElement("img");O.style.maxWidth="140px";O.style.maxHeight="140px";O.style.cursor="pointer";O.style.backgroundColor="white";O.setAttribute("title",mxResources.get("openInNewWindow"));
+O.setAttribute("border","0");O.setAttribute("src",J);this.exportDialog.appendChild(O);mxEvent.addListener(O,"click",mxUtils.bind(this,function(){this.openInNewWindow(J.substring(J.indexOf(",")+1),"image/png",!0);t.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(O){this.spinner.stop();this.handleError(O)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",t);document.body.appendChild(this.exportDialog)}mxEvent.consume(z)}),
+Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(e,f,k,z,t){this.isLocalFileSave()?this.saveLocalFile(k,e,z,t,f):this.saveRequest(e,f,mxUtils.bind(this,function(B,I){return this.createEchoRequest(k,B,z,t,f,I)}),k,t,z)};EditorUi.prototype.saveRequest=function(e,f,k,z,t,B,I){I=null!=I?I:!mxClient.IS_IOS||!navigator.standalone;var O=this.getServiceCount(!1);isLocalStorage&&O++;var J=4>=O?2:6<O?4:3;e=new CreateDialog(this,e,mxUtils.bind(this,function(y,ia){if("_blank"==
+ia||null!=y&&0<y.length){var da=k("_blank"==ia?null:y,ia==App.MODE_DEVICE||"download"==ia||null==ia||"_blank"==ia?"0":"1");null!=da&&(ia==App.MODE_DEVICE||"download"==ia||"_blank"==ia?da.simulate(document,"_blank"):this.pickFolder(ia,mxUtils.bind(this,function(ja){B=null!=B?B:"pdf"==f?"application/pdf":"image/"+f;if(null!=z)try{this.exportFile(z,y,B,!0,ia,ja)}catch(aa){this.handleError(aa)}else this.spinner.spin(document.body,mxResources.get("saving"))&&da.send(mxUtils.bind(this,function(){this.spinner.stop();
+if(200<=da.getStatus()&&299>=da.getStatus())try{this.exportFile(da.getText(),y,B,!0,ia,ja)}catch(aa){this.handleError(aa)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(aa){this.spinner.stop();this.handleError(aa)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,I,null,1<O,J,z,B,t);O=this.isServices(O)?4<O?390:280:160;this.showDialog(e.container,420,O,!0,!0);e.init()};EditorUi.prototype.isServices=
+function(e){return 1!=e};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(e,f,k,z,t,B){};EditorUi.prototype.pickFolder=function(e,f,k){f(null)};EditorUi.prototype.exportSvg=function(e,f,k,z,t,B,I,O,J,y,ia,da,ja,aa){if(this.spinner.spin(document.body,mxResources.get("export")))try{var qa=this.editor.graph.isSelectionEmpty();k=null!=k?k:qa;var sa=f?null:this.editor.graph.background;sa==mxConstants.NONE&&(sa=null);null==sa&&0==f&&(sa=ia?
+this.editor.graph.defaultPageBackgroundColor:"#ffffff");var L=this.editor.graph.getSvg(sa,e,I,O,null,k,null,null,"blank"==y?"_blank":"self"==y?"_top":null,null,!ja,ia,da);z&&this.editor.graph.addSvgShadow(L);var V=this.getBaseFilename()+(t?".drawio":"")+".svg";aa=null!=aa?aa:mxUtils.bind(this,function(W){this.isLocalFileSave()||W.length<=MAX_REQUEST_SIZE?this.saveData(V,"svg",W,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,
+function(){mxUtils.popup(W)}))});var T=mxUtils.bind(this,function(W){this.spinner.stop();t&&W.setAttribute("content",this.getFileData(!0,null,null,null,k,J,null,null,null,!1));aa(Graph.xmlDeclaration+"\n"+(t?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(W))});this.editor.graph.mathEnabled&&this.editor.addMathCss(L);var Y=mxUtils.bind(this,function(W){B?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(W,T,this.thumbImageCache)):T(W)});ja?this.embedFonts(L,
+Y):(this.editor.addFontCss(L),Y(L))}catch(W){this.handleError(W)}};EditorUi.prototype.addRadiobox=function(e,f,k,z,t,B,I){return this.addCheckbox(e,k,z,t,B,I,!0,f)};EditorUi.prototype.addCheckbox=function(e,f,k,z,t,B,I,O){B=null!=B?B:!0;var J=document.createElement("input");J.style.marginRight="8px";J.style.marginTop="16px";J.setAttribute("type",I?"radio":"checkbox");I="geCheckbox-"+Editor.guid();J.id=I;null!=O&&J.setAttribute("name",O);k&&(J.setAttribute("checked","checked"),J.defaultChecked=!0);
+z&&J.setAttribute("disabled","disabled");B&&(e.appendChild(J),k=document.createElement("label"),mxUtils.write(k,f),k.setAttribute("for",I),e.appendChild(k),t||mxUtils.br(e));return J};EditorUi.prototype.addEditButton=function(e,f){var k=this.addCheckbox(e,mxResources.get("edit")+":",!0,null,!0);k.style.marginLeft="24px";var z=this.getCurrentFile(),t="";null!=z&&z.getMode()!=App.MODE_DEVICE&&z.getMode()!=App.MODE_BROWSER&&(t=window.location.href);var B=document.createElement("select");B.style.maxWidth=
+"200px";B.style.width="auto";B.style.marginLeft="8px";B.style.marginRight="10px";B.className="geBtn";z=document.createElement("option");z.setAttribute("value","blank");mxUtils.write(z,mxResources.get("makeCopy"));B.appendChild(z);z=document.createElement("option");z.setAttribute("value","custom");mxUtils.write(z,mxResources.get("custom")+"...");B.appendChild(z);e.appendChild(B);mxEvent.addListener(B,"change",mxUtils.bind(this,function(){if("custom"==B.value){var I=new FilenameDialog(this,t,mxResources.get("ok"),
+function(O){null!=O?t=O:B.value="blank"},mxResources.get("url"),null,null,null,null,function(){B.value="blank"});this.showDialog(I.container,300,80,!0,!1);I.init()}}));mxEvent.addListener(k,"change",mxUtils.bind(this,function(){k.checked&&(null==f||f.checked)?B.removeAttribute("disabled"):B.setAttribute("disabled","disabled")}));mxUtils.br(e);return{getLink:function(){return k.checked?"blank"===B.value?"_blank":t:null},getEditInput:function(){return k},getEditSelect:function(){return B}}};EditorUi.prototype.addLinkSection=
+function(e,f){function k(){var O=document.createElement("div");O.style.width="100%";O.style.height="100%";O.style.boxSizing="border-box";null!=B&&B!=mxConstants.NONE?(O.style.border="1px solid black",O.style.backgroundColor=B):(O.style.backgroundPosition="center center",O.style.backgroundRepeat="no-repeat",O.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");I.innerText="";I.appendChild(O)}mxUtils.write(e,mxResources.get("links")+":");var z=document.createElement("select");z.style.width=
+"100px";z.style.padding="0px";z.style.marginLeft="8px";z.style.marginRight="10px";z.className="geBtn";var t=document.createElement("option");t.setAttribute("value","auto");mxUtils.write(t,mxResources.get("automatic"));z.appendChild(t);t=document.createElement("option");t.setAttribute("value","blank");mxUtils.write(t,mxResources.get("openInNewWindow"));z.appendChild(t);t=document.createElement("option");t.setAttribute("value","self");mxUtils.write(t,mxResources.get("openInThisWindow"));z.appendChild(t);
+f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),z.appendChild(f));e.appendChild(z);mxUtils.write(e,mxResources.get("borderColor")+":");var B="#0000ff",I=null;I=mxUtils.button("",mxUtils.bind(this,function(O){this.pickColor(B||"none",function(J){B=J;k()});mxEvent.consume(O)}));k();I.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";I.style.marginLeft="4px";I.style.height="22px";I.style.width=
+"22px";I.style.position="relative";I.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";I.className="geColorBtn";e.appendChild(I);mxUtils.br(e);return{getColor:function(){return B},getTarget:function(){return z.value},focus:function(){z.focus()}}};EditorUi.prototype.createUrlParameters=function(e,f,k,z,t,B,I){I=null!=I?I:[];z&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||I.push("lightbox=1"),"auto"!=e&&I.push("target="+e),null!=f&&f!=mxConstants.NONE&&
+I.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=t&&0<t.length&&I.push("edit="+encodeURIComponent(t)),B&&I.push("layers=1"),this.editor.graph.foldingEnabled&&I.push("nav=1"));k&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&I.push("page-id="+this.currentPage.getId());return I};EditorUi.prototype.createLink=function(e,f,k,z,t,B,I,O,J,y){J=this.createUrlParameters(e,f,k,z,t,B,J);e=this.getCurrentFile();f=!0;null!=I?k="#U"+encodeURIComponent(I):(e=this.getCurrentFile(),
+O||null==e||e.constructor!=window.DriveFile?k="#R"+encodeURIComponent(k?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(k="#"+e.getHash(),f=!1));f&&null!=e&&null!=e.getTitle()&&e.getTitle()!=this.defaultFilename&&J.push("title="+encodeURIComponent(e.getTitle()));y&&1<k.length&&(J.push("open="+k.substring(1)),k="");return(z&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
+EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<J.length?"?"+J.join("&"):"")+k};EditorUi.prototype.createHtml=function(e,f,k,z,t,B,I,O,J,y,ia,da){this.getBasenames();var ja={};""!=t&&t!=mxConstants.NONE&&(ja.highlight=t);"auto"!==z&&(ja.target=z);y||(ja.lightbox=!1);ja.nav=this.editor.graph.foldingEnabled;k=parseInt(k);isNaN(k)||100==k||(ja.zoom=k/100);k=[];I&&(k.push("pages"),ja.resize=!0,null!=this.pages&&null!=this.currentPage&&(ja.page=mxUtils.indexOf(this.pages,this.currentPage)));
+f&&(k.push("zoom"),ja.resize=!0);O&&k.push("layers");J&&k.push("tags");0<k.length&&(y&&k.push("lightbox"),ja.toolbar=k.join(" "));null!=ia&&0<ia.length&&(ja.edit=ia);null!=e?ja.url=e:ja.xml=this.getFileData(!0,null,null,null,null,!I);f='<div class="mxgraph" style="'+(B?"max-width:100%;":"")+(""!=k?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(ja))+'"></div>';e=null!=e?"&fetch="+encodeURIComponent(e):"";da(f,'<script type="text/javascript" src="'+(0<e.length?
+("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+e:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(e,f,k,z){var t=document.createElement("div");t.style.whiteSpace="nowrap";var B=document.createElement("h3");mxUtils.write(B,mxResources.get("html"));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";
+t.appendChild(B);var I=document.createElement("div");I.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var O=document.createElement("input");O.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";O.setAttribute("value","url");O.setAttribute("type","radio");O.setAttribute("name","type-embedhtmldialog");B=O.cloneNode(!0);B.setAttribute("value","copy");I.appendChild(B);var J=document.createElement("span");mxUtils.write(J,mxResources.get("includeCopyOfMyDiagram"));
+I.appendChild(J);mxUtils.br(I);I.appendChild(O);J=document.createElement("span");mxUtils.write(J,mxResources.get("publicDiagramUrl"));I.appendChild(J);var y=this.getCurrentFile();null==k&&null!=y&&y.constructor==window.DriveFile&&(J=document.createElement("a"),J.style.paddingLeft="12px",J.style.color="gray",J.style.cursor="pointer",mxUtils.write(J,mxResources.get("share")),I.appendChild(J),mxEvent.addListener(J,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(y.getId())})));
+B.setAttribute("checked","checked");null==k&&O.setAttribute("disabled","disabled");t.appendChild(I);var ia=this.addLinkSection(t),da=this.addCheckbox(t,mxResources.get("zoom"),!0,null,!0);mxUtils.write(t,":");var ja=document.createElement("input");ja.setAttribute("type","text");ja.style.marginRight="16px";ja.style.width="60px";ja.style.marginLeft="4px";ja.style.marginRight="12px";ja.value="100%";t.appendChild(ja);var aa=this.addCheckbox(t,mxResources.get("fit"),!0);I=null!=this.pages&&1<this.pages.length;
+var qa=qa=this.addCheckbox(t,mxResources.get("allPages"),I,!I),sa=this.addCheckbox(t,mxResources.get("layers"),!0),L=this.addCheckbox(t,mxResources.get("tags"),!0),V=this.addCheckbox(t,mxResources.get("lightbox"),!0),T=null;I=380;if(EditorUi.enableHtmlEditOption){T=this.addEditButton(t,V);var Y=T.getEditInput();Y.style.marginBottom="16px";I+=50;mxEvent.addListener(V,"change",function(){V.checked?Y.removeAttribute("disabled"):Y.setAttribute("disabled","disabled");Y.checked&&V.checked?T.getEditSelect().removeAttribute("disabled"):
+T.getEditSelect().setAttribute("disabled","disabled")})}e=new CustomDialog(this,t,mxUtils.bind(this,function(){z(O.checked?k:null,da.checked,ja.value,ia.getTarget(),ia.getColor(),aa.checked,qa.checked,sa.checked,L.checked,V.checked,null!=T?T.getLink():null)}),null,e,f);this.showDialog(e.container,340,I,!0,!0);B.focus()};EditorUi.prototype.showPublishLinkDialog=function(e,f,k,z,t,B,I,O){var J=document.createElement("div");J.style.whiteSpace="nowrap";var y=document.createElement("h3");mxUtils.write(y,
+e||mxResources.get("link"));y.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";J.appendChild(y);var ia=this.getCurrentFile();e=0;if(null==ia||ia.constructor!=window.DriveFile||f)I=null!=I?I:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{e=80;I=null!=I?I:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";y=document.createElement("div");y.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
+var da=document.createElement("div");da.style.whiteSpace="normal";mxUtils.write(da,mxResources.get("linkAccountRequired"));y.appendChild(da);da=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(ia.getId())}));da.style.marginTop="12px";da.className="geBtn";y.appendChild(da);J.appendChild(y);da=document.createElement("a");da.style.paddingLeft="12px";da.style.color="gray";da.style.fontSize="11px";da.style.cursor="pointer";mxUtils.write(da,mxResources.get("check"));
+y.appendChild(da);mxEvent.addListener(da,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(ka){this.spinner.stop();ka=new ErrorDialog(this,null,mxResources.get(null!=ka?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(ka.container,300,80,!0,!1);ka.init()}))}))}var ja=null,aa=null;if(null!=k||null!=z)e+=30,mxUtils.write(J,mxResources.get("width")+":"),ja=
+document.createElement("input"),ja.setAttribute("type","text"),ja.style.marginRight="16px",ja.style.width="50px",ja.style.marginLeft="6px",ja.style.marginRight="16px",ja.style.marginBottom="10px",ja.value="100%",J.appendChild(ja),mxUtils.write(J,mxResources.get("height")+":"),aa=document.createElement("input"),aa.setAttribute("type","text"),aa.style.width="50px",aa.style.marginLeft="6px",aa.style.marginBottom="10px",aa.value=z+"px",J.appendChild(aa),mxUtils.br(J);var qa=this.addLinkSection(J,B);k=
+null!=this.pages&&1<this.pages.length;var sa=null;if(null==ia||ia.constructor!=window.DriveFile||f)sa=this.addCheckbox(J,mxResources.get("allPages"),k,!k);var L=this.addCheckbox(J,mxResources.get("lightbox"),!0,null,null,!B),V=this.addEditButton(J,L),T=V.getEditInput();B&&(T.style.marginLeft=L.style.marginLeft,L.style.display="none",e-=20);var Y=this.addCheckbox(J,mxResources.get("layers"),!0);Y.style.marginLeft=T.style.marginLeft;Y.style.marginTop="8px";var W=this.addCheckbox(J,mxResources.get("tags"),
+!0);W.style.marginLeft=T.style.marginLeft;W.style.marginBottom="16px";W.style.marginTop="16px";mxEvent.addListener(L,"change",function(){L.checked?(Y.removeAttribute("disabled"),T.removeAttribute("disabled")):(Y.setAttribute("disabled","disabled"),T.setAttribute("disabled","disabled"));T.checked&&L.checked?V.getEditSelect().removeAttribute("disabled"):V.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,J,mxUtils.bind(this,function(){t(qa.getTarget(),qa.getColor(),null==
+sa?!0:sa.checked,L.checked,V.getLink(),Y.checked,null!=ja?ja.value:null,null!=aa?aa.value:null,W.checked)}),null,mxResources.get("create"),I,O);this.showDialog(f.container,340,300+e,!0,!0);null!=ja?(ja.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ja.select():document.execCommand("selectAll",!1,null)):qa.focus()};EditorUi.prototype.showRemoteExportDialog=function(e,f,k,z,t){var B=document.createElement("div");B.style.whiteSpace="nowrap";var I=document.createElement("h3");mxUtils.write(I,
+mxResources.get("image"));I.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(t?"10":"4")+"px";B.appendChild(I);if(t){mxUtils.write(B,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%";B.appendChild(O);mxUtils.write(B,mxResources.get("borderWidth")+":");var J=document.createElement("input");J.setAttribute("type",
+"text");J.style.marginRight="16px";J.style.width="60px";J.style.marginLeft="4px";J.value=this.lastExportBorder||"0";B.appendChild(J);mxUtils.br(B)}var y=this.addCheckbox(B,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),ia=z?null:this.addCheckbox(B,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);I=this.editor.graph;var da=z?null:this.addCheckbox(B,mxResources.get("transparentBackground"),I.background==mxConstants.NONE||null==I.background);null!=da&&
+(da.style.marginBottom="16px");e=new CustomDialog(this,B,mxUtils.bind(this,function(){var ja=parseInt(O.value)/100||1,aa=parseInt(J.value)||0;k(!y.checked,null!=ia?ia.checked:!1,null!=da?da.checked:!1,ja,aa)}),null,e,f);this.showDialog(e.container,300,(t?25:0)+(z?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(e,f,k,z,t,B,I,O,J){I=null!=I?I:Editor.defaultIncludeDiagram;var y=document.createElement("div");y.style.whiteSpace="nowrap";var ia=this.editor.graph,da="jpeg"==O?220:300,ja=document.createElement("h3");
+mxUtils.write(ja,e);ja.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";y.appendChild(ja);mxUtils.write(y,mxResources.get("zoom")+":");var aa=document.createElement("input");aa.setAttribute("type","text");aa.style.marginRight="16px";aa.style.width="60px";aa.style.marginLeft="4px";aa.style.marginRight="12px";aa.value=this.lastExportZoom||"100%";y.appendChild(aa);mxUtils.write(y,mxResources.get("borderWidth")+":");var qa=document.createElement("input");qa.setAttribute("type",
+"text");qa.style.marginRight="16px";qa.style.width="60px";qa.style.marginLeft="4px";qa.value=this.lastExportBorder||"0";y.appendChild(qa);mxUtils.br(y);var sa=this.addCheckbox(y,mxResources.get("selectionOnly"),!1,ia.isSelectionEmpty()),L=document.createElement("input");L.style.marginTop="16px";L.style.marginRight="8px";L.style.marginLeft="24px";L.setAttribute("disabled","disabled");L.setAttribute("type","checkbox");var V=document.createElement("select");V.style.marginTop="16px";V.style.marginLeft=
+"8px";e=["selectionOnly","diagram","page"];var T={};for(ja=0;ja<e.length;ja++)if(!ia.isSelectionEmpty()||"selectionOnly"!=e[ja]){var Y=document.createElement("option");mxUtils.write(Y,mxResources.get(e[ja]));Y.setAttribute("value",e[ja]);V.appendChild(Y);T[e[ja]]=Y}J?(mxUtils.write(y,mxResources.get("size")+":"),y.appendChild(V),mxUtils.br(y),da+=26,mxEvent.addListener(V,"change",function(){"selectionOnly"==V.value&&(sa.checked=!0)})):B&&(y.appendChild(L),mxUtils.write(y,mxResources.get("crop")),
+mxUtils.br(y),da+=30,mxEvent.addListener(sa,"change",function(){sa.checked?L.removeAttribute("disabled"):L.setAttribute("disabled","disabled")}));ia.isSelectionEmpty()?J&&(sa.style.display="none",sa.nextSibling.style.display="none",sa.nextSibling.nextSibling.style.display="none",da-=30):(V.value="diagram",L.setAttribute("checked","checked"),L.defaultChecked=!0,mxEvent.addListener(sa,"change",function(){V.value=sa.checked?"selectionOnly":"diagram"}));var W=this.addCheckbox(y,mxResources.get("transparentBackground"),
+!1,null,null,"jpeg"!=O),ka=null;Editor.isDarkMode()&&(ka=this.addCheckbox(y,mxResources.get("dark"),!0),da+=26);var q=this.addCheckbox(y,mxResources.get("shadow"),ia.shadowVisible),F=null;if("png"==O||"jpeg"==O)F=this.addCheckbox(y,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),da+=30;var S=this.addCheckbox(y,mxResources.get("includeCopyOfMyDiagram"),I,null,null,"jpeg"!=O);S.style.marginBottom="16px";var ba=document.createElement("input");ba.style.marginBottom="16px";ba.style.marginRight=
+"8px";ba.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||ba.setAttribute("disabled","disabled");var U=document.createElement("select");U.style.maxWidth="260px";U.style.marginLeft="8px";U.style.marginRight="10px";U.style.marginBottom="16px";U.className="geBtn";B=document.createElement("option");B.setAttribute("value","none");mxUtils.write(B,mxResources.get("noChange"));U.appendChild(B);B=document.createElement("option");B.setAttribute("value","embedFonts");mxUtils.write(B,
+mxResources.get("embedFonts"));U.appendChild(B);B=document.createElement("option");B.setAttribute("value","lblToSvg");mxUtils.write(B,mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||U.appendChild(B);mxEvent.addListener(U,"change",mxUtils.bind(this,function(){"lblToSvg"==U.value?(ba.checked=!0,ba.setAttribute("disabled","disabled"),T.page.style.display="none","page"==V.value&&(V.value="diagram"),q.checked=!1,q.setAttribute("disabled","disabled"),ea.style.display="inline-block",
+ca.style.display="none"):"disabled"==ba.getAttribute("disabled")&&(ba.checked=!1,ba.removeAttribute("disabled"),q.removeAttribute("disabled"),T.page.style.display="",ea.style.display="none",ca.style.display="")}));f&&(y.appendChild(ba),mxUtils.write(y,mxResources.get("embedImages")),mxUtils.br(y),mxUtils.write(y,mxResources.get("txtSettings")+":"),y.appendChild(U),mxUtils.br(y),da+=60);var ca=document.createElement("select");ca.style.maxWidth="260px";ca.style.marginLeft="8px";ca.style.marginRight=
+"10px";ca.className="geBtn";f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));ca.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));ca.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));ca.appendChild(f);var ea=document.createElement("div");mxUtils.write(ea,mxResources.get("LinksLost"));
+ea.style.margin="7px";ea.style.display="none";"svg"==O&&(mxUtils.write(y,mxResources.get("links")+":"),y.appendChild(ca),y.appendChild(ea),mxUtils.br(y),mxUtils.br(y),da+=50);k=new CustomDialog(this,y,mxUtils.bind(this,function(){this.lastExportBorder=qa.value;this.lastExportZoom=aa.value;t(aa.value,W.checked,!sa.checked,q.checked,S.checked,ba.checked,qa.value,L.checked,!1,ca.value,null!=F?F.checked:null,null!=ka?ka.checked:null,V.value,"embedFonts"==U.value,"lblToSvg"==U.value)}),null,k,z);this.showDialog(k.container,
+340,da,!0,!0,null,null,null,null,!0);aa.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?aa.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(e,f,k,z,t){var B=document.createElement("div");B.style.whiteSpace="nowrap";var I=this.editor.graph;if(null!=f){var O=document.createElement("h3");mxUtils.write(O,f);O.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";B.appendChild(O)}var J=this.addCheckbox(B,mxResources.get("fit"),
+!0),y=this.addCheckbox(B,mxResources.get("shadow"),I.shadowVisible&&z,!z),ia=this.addCheckbox(B,k),da=this.addCheckbox(B,mxResources.get("lightbox"),!0),ja=this.addEditButton(B,da),aa=ja.getEditInput(),qa=1<I.model.getChildCount(I.model.getRoot()),sa=this.addCheckbox(B,mxResources.get("layers"),qa,!qa);sa.style.marginLeft=aa.style.marginLeft;sa.style.marginBottom="12px";sa.style.marginTop="8px";mxEvent.addListener(da,"change",function(){da.checked?(qa&&sa.removeAttribute("disabled"),aa.removeAttribute("disabled")):
+(sa.setAttribute("disabled","disabled"),aa.setAttribute("disabled","disabled"));aa.checked&&da.checked?ja.getEditSelect().removeAttribute("disabled"):ja.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,B,mxUtils.bind(this,function(){e(J.checked,y.checked,ia.checked,da.checked,ja.getLink(),sa.checked)}),null,mxResources.get("embed"),t);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(e,f,k,z,t,B,I,O){function J(aa){var qa=" ",sa=
+"";z&&(qa=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(null!=ia?"&page="+ia:"")+(t?"&edit=_blank":"")+(B?"&layers=1":"")+"');}})(this);\"",sa+="cursor:pointer;");e&&(sa+="max-width:100%;");var L=
+"";k&&(L=' width="'+Math.round(y.width)+'" height="'+Math.round(y.height)+'"');I('<img src="'+aa+'"'+L+(""!=sa?' style="'+sa+'"':"")+qa+"/>")}var y=this.editor.graph.getGraphBounds(),ia=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(aa){var qa=z?this.getFileData(!0):null;aa=this.createImageDataUri(aa,qa,"png");J(aa)}),null,null,null,mxUtils.bind(this,function(aa){O({message:mxResources.get("unknownError")})}),null,!0,k?2:1,null,f,null,
+null,Editor.defaultBorder);else if(f=this.getFileData(!0),y.width*y.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var da="";k&&(da="&w="+Math.round(2*y.width)+"&h="+Math.round(2*y.height));var ja=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(z?"1":"0")+da+"&xml="+encodeURIComponent(f));ja.send(mxUtils.bind(this,function(){200<=ja.getStatus()&&299>=ja.getStatus()?J("data:image/png;base64,"+ja.getText()):O({message:mxResources.get("unknownError")})}))}else O({message:mxResources.get("drawingTooLarge")})};
+EditorUi.prototype.createEmbedSvg=function(e,f,k,z,t,B,I){var O=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!k),J=O.getElementsByTagName("a");if(null!=J)for(var y=0;y<J.length;y++){var ia=J[y].getAttribute("href");null!=ia&&"#"==ia.charAt(0)&&"_blank"==J[y].getAttribute("target")&&J[y].removeAttribute("target")}z&&O.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(O);if(k){var da=" ",ja="";z&&(da="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":"")+(B?"&layers=1":"")+"');}})(this);\"",ja+="cursor:pointer;");e&&(ja+="max-width:100%;");this.editor.convertImages(O,mxUtils.bind(this,function(aa){I('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(aa))+'"'+(""!=ja?' style="'+ja+'"':"")+da+"/>")}))}else ja="",z&&(f=this.getSelectedPageIndex(),O.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:"")+(t?"&edit=_blank":"")+(B?"&layers=1":"")+"');}}})(this);"),ja+="cursor:pointer;"),e&&(e=parseInt(O.getAttribute("width")),t=parseInt(O.getAttribute("height")),O.setAttribute("viewBox","-0.5 -0.5 "+e+" "+t),ja+="max-width:100%;max-height:"+t+"px;",O.removeAttribute("height")),""!=ja&&O.setAttribute("style",ja),this.editor.addFontCss(O),this.editor.graph.mathEnabled&&this.editor.addMathCss(O),I(mxUtils.getXml(O))};EditorUi.prototype.timeSince=
+function(e){e=Math.floor((new Date-e)/1E3);var f=Math.floor(e/31536E3);if(1<f)return f+" "+mxResources.get("years");f=Math.floor(e/2592E3);if(1<f)return f+" "+mxResources.get("months");f=Math.floor(e/86400);if(1<f)return f+" "+mxResources.get("days");f=Math.floor(e/3600);if(1<f)return f+" "+mxResources.get("hours");f=Math.floor(e/60);return 1<f?f+" "+mxResources.get("minutes"):1==f?f+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(e,f){if(null!=e){var k=null;if("diagram"==
+e.nodeName)k=e;else if("mxfile"==e.nodeName){var z=e.getElementsByTagName("diagram");if(0<z.length){k=z[0];var t=f.getGlobalVariable;f.getGlobalVariable=function(B){return"page"==B?k.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==B?1:t.apply(this,arguments)}}}null!=k&&(e=Editor.parseDiagramNode(k))}z=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(e)}catch(B){}finally{this.editor.graph=z}return e};EditorUi.prototype.getPngFileProperties=function(e){var f=
+1,k=0;if(null!=e){if(e.hasAttribute("scale")){var z=parseFloat(e.getAttribute("scale"));!isNaN(z)&&0<z&&(f=z)}e.hasAttribute("border")&&(z=parseInt(e.getAttribute("border")),!isNaN(z)&&0<z&&(k=z))}return{scale:f,border:k}};EditorUi.prototype.getEmbeddedPng=function(e,f,k,z,t){try{var B=this.editor.graph,I=null!=B.themes&&"darkTheme"==B.defaultThemeName,O=null;if(null!=k&&0<k.length)B=this.createTemporaryGraph(I?B.getDefaultStylesheet():B.getStylesheet()),document.body.appendChild(B.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(k).documentElement,
+!0),B),O=k;else if(I||null!=this.pages&&this.currentPage!=this.pages[0]){B=this.createTemporaryGraph(I?B.getDefaultStylesheet():B.getStylesheet());var J=B.getGlobalVariable;B.setBackgroundImage=this.editor.graph.setBackgroundImage;var y=this.pages[0];this.currentPage==y?B.setBackgroundImage(this.editor.graph.backgroundImage):null!=y.viewState&&null!=y.viewState&&B.setBackgroundImage(y.viewState.backgroundImage);B.getGlobalVariable=function(ia){return"page"==ia?y.getName():"pagenumber"==ia?1:J.apply(this,
+arguments)};document.body.appendChild(B.container);B.model.setRoot(y.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(ia){try{null==O&&(O=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var da=ia.toDataURL("image/png");da=Editor.writeGraphModelToPng(da,"tEXt","mxfile",encodeURIComponent(O));e(da.substring(da.lastIndexOf(",")+1));B!=this.editor.graph&&B.container.parentNode.removeChild(B.container)}catch(ja){null!=f&&f(ja)}}),null,null,null,mxUtils.bind(this,function(ia){null!=
+f&&f(ia)}),null,null,z,null,B.shadowVisible,null,B,t,null,null,null,"diagram",null)}catch(ia){null!=f&&f(ia)}};EditorUi.prototype.getEmbeddedSvg=function(e,f,k,z,t,B,I,O,J,y,ia,da,ja){O=null!=O?O:!0;ia=null!=ia?ia:0;I=null!=J?J:f.background;I==mxConstants.NONE&&(I=null);B=f.getSvg(I,y,ia,null,null,B,null,null,null,f.shadowVisible||da,null,ja,"diagram");(f.shadowVisible||da)&&f.addSvgShadow(B,null,null,0==ia);null!=e&&B.setAttribute("content",e);null!=k&&B.setAttribute("resource",k);var aa=mxUtils.bind(this,
+function(qa){qa=(z?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(qa);null!=t&&t(qa);return qa});f.mathEnabled&&this.editor.addMathCss(B);if(null!=t)this.embedFonts(B,mxUtils.bind(this,function(qa){O?this.editor.convertImages(qa,mxUtils.bind(this,function(sa){aa(sa)})):aa(qa)}));else return aa(B)};EditorUi.prototype.embedFonts=function(e,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(e,
+this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(k){try{null!=k&&this.editor.addFontCss(e,k),f(e)}catch(z){f(e)}}))}catch(k){f(e)}}))};EditorUi.prototype.exportImage=function(e,f,k,z,t,B,I,O,J,y,ia,da,ja){J=null!=J?J:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var aa=this.editor.graph.isSelectionEmpty();k=null!=k?k:aa;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(qa){this.spinner.stop();
+try{this.saveCanvas(qa,t?this.getFileData(!0,null,null,null,k,O):null,J,null==this.pages||0==this.pages.length,ia)}catch(sa){this.handleError(sa)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(qa){this.spinner.stop();this.handleError(qa)}),null,k,e||1,f,z,null,null,B,I,y,da,ja)}catch(qa){this.spinner.stop(),this.handleError(qa)}}};EditorUi.prototype.isCorsEnabledForUrl=function(e){return this.editor.isCorsEnabledForUrl(e)};EditorUi.prototype.importXml=function(e,f,k,z,t,B,I){f=null!=
+f?f:0;k=null!=k?k:0;var O=[];try{var J=this.editor.graph;if(null!=e&&0<e.length){J.model.beginUpdate();try{var y=mxUtils.parseXml(e);e={};var ia=this.editor.extractGraphModel(y.documentElement,null!=this.pages);if(null!=ia&&"mxfile"==ia.nodeName&&null!=this.pages){var da=ia.getElementsByTagName("diagram");if(1==da.length&&!B){if(ia=Editor.parseDiagramNode(da[0]),null!=this.currentPage&&(e[da[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var ja=da[0].getAttribute("name");null!=
+ja&&""!=ja&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,ja))}}else if(0<da.length){B=[];var aa=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(e[da[0].getAttribute("id")]=this.pages[0].getId(),ia=Editor.parseDiagramNode(da[0]),z=!1,aa=1);for(;aa<da.length;aa++){var qa=da[aa].getAttribute("id");da[aa].removeAttribute("id");var sa=this.updatePageRoot(new DiagramPage(da[aa]));e[qa]=da[aa].getAttribute("id");var L=this.pages.length;null==sa.getName()&&sa.setName(mxResources.get("pageWithNumber",
+[L+1]));J.model.execute(new ChangePage(this,sa,sa,L,!0));B.push(sa)}this.updatePageLinks(e,B)}}if(null!=ia&&"mxGraphModel"===ia.nodeName){O=J.importGraphModel(ia,f,k,z);if(null!=O)for(aa=0;aa<O.length;aa++)this.updatePageLinksForCell(e,O[aa]);var V=J.parseBackgroundImage(ia.getAttribute("backgroundImage"));if(null!=V&&null!=V.originalSrc){this.updateBackgroundPageLink(e,V);var T=new ChangePageSetup(this,null,V);T.ignoreColor=!0;J.model.execute(T)}}I&&this.insertHandler(O,null,null,J.defaultVertexStyle,
+J.defaultEdgeStyle,!1,!0)}finally{J.model.endUpdate()}}}catch(Y){if(t)throw Y;this.handleError(Y)}return O};EditorUi.prototype.updatePageLinks=function(e,f){for(var k=0;k<f.length;k++)this.updatePageLinksForCell(e,f[k].root),null!=f[k].viewState&&this.updateBackgroundPageLink(e,f[k].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(e,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var k=e[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=k&&(f.originalSrc=
+"data:page/id,"+k)}}catch(z){}};EditorUi.prototype.updatePageLinksForCell=function(e,f){var k=document.createElement("div"),z=this.editor.graph,t=z.getLinkForCell(f);null!=t&&z.setLinkForCell(f,this.updatePageLink(e,t));if(z.isHtmlLabel(f)){k.innerHTML=z.sanitizeHtml(z.getLabel(f));for(var B=k.getElementsByTagName("a"),I=!1,O=0;O<B.length;O++)t=B[O].getAttribute("href"),null!=t&&(B[O].setAttribute("href",this.updatePageLink(e,t)),I=!0);I&&z.labelChanged(f,k.innerHTML)}for(O=0;O<z.model.getChildCount(f);O++)this.updatePageLinksForCell(e,
+z.model.getChildAt(f,O))};EditorUi.prototype.updatePageLink=function(e,f){if(Graph.isPageLink(f)){var k=e[f.substring(f.indexOf(",")+1)];f=null!=k?"data:page/id,"+k:null}else if("data:action/json,"==f.substring(0,17))try{var z=JSON.parse(f.substring(17));if(null!=z.actions){for(var t=0;t<z.actions.length;t++){var B=z.actions[t];if(null!=B.open&&Graph.isPageLink(B.open)){var I=B.open.substring(B.open.indexOf(",")+1);k=e[I];null!=k?B.open="data:page/id,"+k:null==this.getPageById(I)&&delete B.open}}f=
+"data:action/json,"+JSON.stringify(z)}}catch(O){}return f};EditorUi.prototype.isRemoteVisioFormat=function(e){return/(\.v(sd|dx))($|\?)/i.test(e)||/(\.vs(s|x))($|\?)/i.test(e)};EditorUi.prototype.importVisio=function(e,f,k,z,t){z=null!=z?z:e.name;k=null!=k?k:mxUtils.bind(this,function(I){this.handleError(I)});var B=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var I=this.isRemoteVisioFormat(z);try{var O="UNKNOWN-VISIO",J=z.lastIndexOf(".");if(0<=J&&J<z.length)O=z.substring(J+
+1).toUpperCase();else{var y=z.lastIndexOf("/");0<=y&&y<z.length&&(z=z.substring(y+1))}EditorUi.logEvent({category:O+"-MS-IMPORT-FILE",action:"filename_"+z,label:I?"remote":"local"})}catch(da){}if(I)if(null==VSD_CONVERT_URL||this.isOffline())k({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{I=new FormData;I.append("file1",e,z);var ia=new XMLHttpRequest;ia.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(z)?"?stencil=1":
+""));ia.responseType="blob";this.addRemoteServiceSecurityCheck(ia);null!=t&&ia.setRequestHeader("x-convert-custom",t);ia.onreadystatechange=mxUtils.bind(this,function(){if(4==ia.readyState)if(200<=ia.status&&299>=ia.status)try{var da=ia.response;if("text/xml"==da.type){var ja=new FileReader;ja.onload=mxUtils.bind(this,function(aa){try{f(aa.target.result)}catch(qa){k({message:mxResources.get("errorLoadingFile")})}});ja.readAsText(da)}else this.doImportVisio(da,f,k,z)}catch(aa){k(aa)}else try{""==ia.responseType||
+"text"==ia.responseType?k({message:ia.responseText}):(ja=new FileReader,ja.onload=function(){k({message:JSON.parse(ja.result).Message})},ja.readAsText(ia.response))}catch(aa){k({})}});ia.send(I)}else try{this.doImportVisio(e,f,k,z)}catch(da){k(da)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?B():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",B))};EditorUi.prototype.importGraphML=
+function(e,f,k){k=null!=k?k:mxUtils.bind(this,function(t){this.handleError(t)});var z=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(e,f,k)}catch(t){k(t)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?z():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",z))};EditorUi.prototype.exportVisio=function(e){var f=mxUtils.bind(this,
+function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(e)||this.handleError({message:mxResources.get("unknownError")})}catch(k){this.handleError(k)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.convertLucidChart=function(e,
+f,k){var z=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var t=JSON.parse(e);f(LucidImporter.importState(t));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+e.length}),null!=window.console&&"1"==urlParams.test){var B=[(new Date).toISOString(),"convertLucidChart",t];null!=t.state&&B.push(JSON.parse(t.state));if(null!=t.svgThumbs)for(var I=0;I<t.svgThumbs.length;I++)B.push(Editor.createSvgDataUri(t.svgThumbs[I]));null!=
+t.thumb&&B.push(t.thumb);console.log.apply(console,B)}}catch(O){}}catch(O){null!=window.console&&console.error(O),k(O)}else k({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)})})})}):mxscript("js/extensions.min.js",z))};EditorUi.prototype.generateMermaidImage=function(e,f,k,z){var t=this,B=function(){try{this.loadingMermaid=!1,f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig),f.securityLevel="strict",f.startOnLoad=!1,Editor.isDarkMode()&&(f.theme="dark"),mermaid.mermaidAPI.initialize(f),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),e,function(I){try{if(mxClient.IS_IE||mxClient.IS_IE11)I=
+I.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var O=mxUtils.parseXml(I).getElementsByTagName("svg");if(0<O.length){var J=parseFloat(O[0].getAttribute("width")),y=parseFloat(O[0].getAttribute("height"));if(isNaN(J)||isNaN(y))try{var ia=O[0].getAttribute("viewBox").split(/\s+/);J=parseFloat(ia[2]);y=parseFloat(ia[3])}catch(da){J=J||100,y=y||100}k(t.convertDataUri(Editor.createSvgDataUri(I)),J,y)}else z({message:mxResources.get("invalidInput")})}catch(da){z(da)}})}catch(I){z(I)}};
+"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?B():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",B):mxscript("js/extensions.min.js",B))};EditorUi.prototype.generatePlantUmlImage=function(e,f,k,z){function t(O,J,y){c1=O>>2;c2=(O&3)<<4|J>>4;c3=(J&15)<<2|y>>6;c4=y&63;r="";r+=B(c1&63);r+=B(c2&63);r+=B(c3&63);return r+=B(c4&63)}function B(O){if(10>O)return String.fromCharCode(48+O);O-=10;if(26>O)return String.fromCharCode(65+O);O-=26;if(26>O)return String.fromCharCode(97+
+O);O-=26;return 0==O?"-":1==O?"_":"?"}var I=new XMLHttpRequest;I.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(O){r="";for(i=0;i<O.length;i+=3)r=i+2==O.length?r+t(O.charCodeAt(i),O.charCodeAt(i+1),0):i+1==O.length?r+t(O.charCodeAt(i),0,0):r+t(O.charCodeAt(i),O.charCodeAt(i+1),O.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(e))),!0);"txt"!=f&&(I.responseType="blob");I.onload=function(O){if(200<=this.status&&300>this.status)if("txt"==
+f)k(this.response);else{var J=new FileReader;J.readAsDataURL(this.response);J.onloadend=function(y){var ia=new Image;ia.onload=function(){try{var da=ia.width,ja=ia.height;if(0==da&&0==ja){var aa=J.result,qa=aa.indexOf(","),sa=decodeURIComponent(escape(atob(aa.substring(qa+1)))),L=mxUtils.parseXml(sa).getElementsByTagName("svg");0<L.length&&(da=parseFloat(L[0].getAttribute("width")),ja=parseFloat(L[0].getAttribute("height")))}k(J.result,da,ja)}catch(V){z(V)}};ia.src=J.result};J.onerror=function(y){z(y)}}else z(O)};
+I.onerror=function(O){z(O)};I.send()};EditorUi.prototype.insertAsPreText=function(e,f,k){var z=this.editor.graph,t=null;z.getModel().beginUpdate();try{t=z.insertVertex(null,null,"<pre>"+e+"</pre>",f,k,1,1,"text;html=1;align=left;verticalAlign=top;"),z.updateCellSize(t,!0)}finally{z.getModel().endUpdate()}return t};EditorUi.prototype.insertTextAt=function(e,f,k,z,t,B,I,O){B=null!=B?B:!0;I=null!=I?I:!0;if(null!=e)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(e))this.isOffline()?
+this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(e.replace(/\s+/g," "),mxUtils.bind(this,function(ja){4==ja.readyState&&200<=ja.status&&299>=ja.status&&this.editor.graph.setSelectionCells(this.insertTextAt(ja.responseText,f,k,!0))}));else if("data:"==e.substring(0,5)||!this.isOffline()&&(t||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(e))){var J=this.editor.graph;if("data:application/pdf;base64,"==e.substring(0,28)){var y=Editor.extractGraphModelFromPdf(e);if(null!=
+y&&0<y.length)return this.importXml(y,f,k,B,!0,O)}if(Editor.isPngDataUrl(e)&&(y=Editor.extractGraphModelFromPng(e),null!=y&&0<y.length))return this.importXml(y,f,k,B,!0,O);if("data:image/svg+xml;"==e.substring(0,19))try{y=null;"data:image/svg+xml;base64,"==e.substring(0,26)?(y=e.substring(e.indexOf(",")+1),y=window.atob&&!mxClient.IS_SF?atob(y):Base64.decode(y,!0)):y=decodeURIComponent(e.substring(e.indexOf(",")+1));var ia=this.importXml(y,f,k,B,!0,O);if(0<ia.length)return ia}catch(ja){}this.loadImage(e,
+mxUtils.bind(this,function(ja){if("data:"==e.substring(0,5))this.resizeImage(ja,e,mxUtils.bind(this,function(sa,L,V){J.setSelectionCell(J.insertVertex(null,null,"",J.snap(f),J.snap(k),L,V,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(sa)+";"))}),I,this.maxImageSize);else{var aa=Math.min(1,Math.min(this.maxImageSize/ja.width,this.maxImageSize/ja.height)),qa=Math.round(ja.width*aa);ja=Math.round(ja.height*
+aa);J.setSelectionCell(J.insertVertex(null,null,"",J.snap(f),J.snap(k),qa,ja,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+e+";"))}}),mxUtils.bind(this,function(){var ja=null;J.getModel().beginUpdate();try{ja=J.insertVertex(J.getDefaultParent(),null,e,J.snap(f),J.snap(k),1,1,"text;"+(z?"html=1;":"")),J.updateCellSize(ja),J.fireEvent(new mxEventObject("textInserted","cells",[ja]))}finally{J.getModel().endUpdate()}J.setSelectionCell(ja)}))}else{e=
+Graph.zapGremlins(mxUtils.trim(e));if(this.isCompatibleString(e))return this.importXml(e,f,k,B,null,O);if(0<e.length)if(this.isLucidChartData(e))this.convertLucidChart(e,mxUtils.bind(this,function(ja){this.editor.graph.setSelectionCells(this.importXml(ja,f,k,B,null,O))}),mxUtils.bind(this,function(ja){this.handleError(ja)}));else{J=this.editor.graph;t=null;J.getModel().beginUpdate();try{t=J.insertVertex(J.getDefaultParent(),null,"",J.snap(f),J.snap(k),1,1,"text;whiteSpace=wrap;"+(z?"html=1;":""));
+J.fireEvent(new mxEventObject("textInserted","cells",[t]));"<"==e.charAt(0)&&e.indexOf(">")==e.length-1&&(e=mxUtils.htmlEntities(e));e.length>this.maxTextBytes&&(e=e.substring(0,this.maxTextBytes)+"...");t.value=e;J.updateCellSize(t);if(0<this.maxTextWidth&&t.geometry.width>this.maxTextWidth){var da=J.getPreferredSizeForCell(t,this.maxTextWidth);t.geometry.width=da.width;t.geometry.height=da.height}Graph.isLink(t.value)&&J.setLinkForCell(t,t.value);t.geometry.width+=J.gridSize;t.geometry.height+=
+J.gridSize}finally{J.getModel().endUpdate()}return[t]}}return[]};EditorUi.prototype.formatFileSize=function(e){var f=-1;do e/=1024,f++;while(1024<e);return Math.max(e,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]};EditorUi.prototype.convertDataUri=function(e){if("data:"==e.substring(0,5)){var f=e.indexOf(";");0<f&&(e=e.substring(0,f)+e.substring(e.indexOf(",",f+1)))}return e};EditorUi.prototype.isRemoteFileFormat=function(e,f){return/("contentType":\s*"application\/gliffy\+json")/.test(e)};
+EditorUi.prototype.isLucidChartData=function(e){return null!=e&&('{"state":"{\\"Properties\\":'==e.substring(0,26)||'{"Properties":'==e.substring(0,14))};EditorUi.prototype.importLocalFile=function(e,f){if(e&&Graph.fileSupport){if(null==this.importFileInputElt){var 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(I,O){StorageFile.listFiles(this,"F",I,O)});window.openBrowserFile=mxUtils.bind(this,function(I,O,J){StorageFile.getFileContent(this,I,O,J)});window.deleteBrowserFile=mxUtils.bind(this,function(I,O,J){StorageFile.deleteFile(this,I,O,J)});if(!f){var z=Editor.useLocalStorage;Editor.useLocalStorage=!e}window.openFile=
+new OpenFile(mxUtils.bind(this,function(I){this.hideDialog(I)}));window.openFile.setConsumer(mxUtils.bind(this,function(I,O){null!=O&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(O)?(I=new Blob([I],{type:"application/octet-stream"}),this.importVisio(I,mxUtils.bind(this,function(J){this.importXml(J,0,0,!0)}),null,O)):this.editor.graph.setSelectionCells(this.importXml(I,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,
+function(){window.openFile=null});if(!f){var t=this.dialog,B=t.close;this.dialog.close=mxUtils.bind(this,function(I){Editor.useLocalStorage=z;B.apply(t,arguments);I&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(e,f,k){var z=this,t=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(e).then(function(B){if(mxUtils.isEmptyObject(B.files))k();else{var I=0,O,J=!1;B.forEach(function(y,ia){y=
+ia.name.toLowerCase();"diagram/diagram.xml"==y?(J=!0,ia.async("string").then(function(da){0==da.indexOf("<mxfile ")?f(da):k()})):0==y.indexOf("versions/")&&(y=parseInt(y.substr(9)),y>I&&(I=y,O=ia))});0<I?O.async("string").then(function(y){(new XMLHttpRequest).upload&&z.isRemoteFileFormat(y,e.name)?z.isOffline()?z.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,k):z.parseFileData(y,mxUtils.bind(this,function(ia){4==ia.readyState&&(200<=ia.status&&299>=ia.status?f(ia.responseText):
+k())}),e.name):k()}):J||k()}},function(B){k(B)}):k()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?t():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",t))};EditorUi.prototype.importFile=function(e,f,k,z,t,B,I,O,J,y,ia,da){y=null!=y?y:!0;var ja=!1,aa=null,qa=mxUtils.bind(this,function(sa){var L=null;null!=sa&&"<mxlibrary"==sa.substring(0,10)?this.loadLibrary(new LocalLibrary(this,sa,I)):L=this.importXml(sa,k,z,y,null,null!=da?mxEvent.isControlDown(da):null);null!=
+O&&O(L)});"image"==f.substring(0,5)?(J=!1,"image/png"==f.substring(0,9)&&(f=ia?null:this.extractGraphModelFromPng(e),null!=f&&0<f.length&&(aa=this.importXml(f,k,z,y,null,null!=da?mxEvent.isControlDown(da):null),J=!0)),J||(f=this.editor.graph,J=e.indexOf(";"),0<J&&(e=e.substring(0,J)+e.substring(e.indexOf(",",J+1))),y&&f.isGridEnabled()&&(k=f.snap(k),z=f.snap(z)),aa=[f.insertVertex(null,null,"",k,z,t,B,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+e+";")])):/(\.*<graphml )/.test(e)?(ja=!0,this.importGraphML(e,qa)):null!=J&&null!=I&&(/(\.v(dx|sdx?))($|\?)/i.test(I)||/(\.vs(x|sx?))($|\?)/i.test(I))?(ja=!0,this.importVisio(J,qa)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(e,I)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(ja=!0,t=mxUtils.bind(this,function(sa){4==sa.readyState&&(200<=sa.status&&299>=sa.status?qa(sa.responseText):null!=O&&O(null))}),null!=e?this.parseFileData(e,t,I):this.parseFile(J,
+t,I)):0==e.indexOf("PK")&&null!=J?(ja=!0,this.importZipFile(J,qa,mxUtils.bind(this,function(){aa=this.insertTextAt(this.validateFileData(e),k,z,!0,null,y);O(aa)}))):/(\.v(sd|dx))($|\?)/i.test(I)||/(\.vs(s|x))($|\?)/i.test(I)||(aa=this.insertTextAt(this.validateFileData(e),k,z,!0,null,y,null,null!=da?mxEvent.isControlDown(da):null));ja||null==O||O(aa);return aa};EditorUi.prototype.importFiles=function(e,f,k,z,t,B,I,O,J,y,ia,da,ja){z=null!=z?z:this.maxImageSize;y=null!=y?y:this.maxImageBytes;var aa=
+null!=f&&null!=k,qa=!0;f=null!=f?f:0;k=null!=k?k:0;var sa=!1;if(!mxClient.IS_CHROMEAPP&&null!=e)for(var L=ia||this.resampleThreshold,V=0;V<e.length;V++)if("image/svg"!==e[V].type.substring(0,9)&&"image/"===e[V].type.substring(0,6)&&e[V].size>L){sa=!0;break}var T=mxUtils.bind(this,function(){var Y=this.editor.graph,W=Y.gridSize;t=null!=t?t:mxUtils.bind(this,function(U,ca,ea,na,ra,ya,va,Da,pa){try{return null!=U&&"<mxlibrary"==U.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,
+U,va)),null):this.isCompatibleString(U)&&1==e.length&&this.isBlankFile()&&!this.canUndo()?(this.spinner.stop(),this.fileLoaded(new LocalFile(this,U,va,!0)),null):this.importFile(U,ca,ea,na,ra,ya,va,Da,pa,aa,da,ja)}catch(Aa){return this.handleError(Aa),null}});B=null!=B?B:mxUtils.bind(this,function(U){Y.setSelectionCells(U)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var ka=e.length,q=ka,F=[],S=mxUtils.bind(this,function(U,ca){F[U]=ca;if(0==--q){this.spinner.stop();if(null!=
+O)O(F);else{var ea=[];Y.getModel().beginUpdate();try{for(U=0;U<F.length;U++){var na=F[U]();null!=na&&(ea=ea.concat(na))}}finally{Y.getModel().endUpdate()}}B(ea)}}),ba=0;ba<ka;ba++)mxUtils.bind(this,function(U){var ca=e[U];if(null!=ca){var ea=new FileReader;ea.onload=mxUtils.bind(this,function(na){if(null==I||I(ca))if("image/"==ca.type.substring(0,6))if("image/svg"==ca.type.substring(0,9)){var ra=Graph.clipSvgDataUri(na.target.result),ya=ra.indexOf(",");ya=decodeURIComponent(escape(atob(ra.substring(ya+
+1))));var va=mxUtils.parseXml(ya);ya=va.getElementsByTagName("svg");if(0<ya.length){ya=ya[0];var Da=da?null:ya.getAttribute("content");null!=Da&&"<"!=Da.charAt(0)&&"%"!=Da.charAt(0)&&(Da=unescape(window.atob?atob(Da):Base64.decode(Da,!0)));null!=Da&&"%"==Da.charAt(0)&&(Da=decodeURIComponent(Da));null==Da||"<mxfile "!==Da.substring(0,8)&&"<mxGraphModel "!==Da.substring(0,14)?S(U,mxUtils.bind(this,function(){try{if(null!=va){var xa=va.getElementsByTagName("svg");if(0<xa.length){var Ma=xa[0],Oa=Ma.getAttribute("width"),
+Na=Ma.getAttribute("height");Oa=null!=Oa&&"%"!=Oa.charAt(Oa.length-1)?parseFloat(Oa):NaN;Na=null!=Na&&"%"!=Na.charAt(Na.length-1)?parseFloat(Na):NaN;var La=Ma.getAttribute("viewBox");if(null==La||0==La.length)Ma.setAttribute("viewBox","0 0 "+Oa+" "+Na);else if(isNaN(Oa)||isNaN(Na)){var Ba=La.split(" ");3<Ba.length&&(Oa=parseFloat(Ba[2]),Na=parseFloat(Ba[3]))}ra=Editor.createSvgDataUri(mxUtils.getXml(Ma));var ab=Math.min(1,Math.min(z/Math.max(1,Oa)),z/Math.max(1,Na)),Xa=t(ra,ca.type,f+U*W,k+U*W,Math.max(1,
+Math.round(Oa*ab)),Math.max(1,Math.round(Na*ab)),ca.name);if(isNaN(Oa)||isNaN(Na)){var x=new Image;x.onload=mxUtils.bind(this,function(){Oa=Math.max(1,x.width);Na=Math.max(1,x.height);Xa[0].geometry.width=Oa;Xa[0].geometry.height=Na;Ma.setAttribute("viewBox","0 0 "+Oa+" "+Na);ra=Editor.createSvgDataUri(mxUtils.getXml(Ma));var H=ra.indexOf(";");0<H&&(ra=ra.substring(0,H)+ra.substring(ra.indexOf(",",H+1)));Y.setCellStyles("image",ra,[Xa[0]])});x.src=Editor.createSvgDataUri(mxUtils.getXml(Ma))}return Xa}}}catch(H){}return null})):
+S(U,mxUtils.bind(this,function(){return t(Da,"text/xml",f+U*W,k+U*W,0,0,ca.name)}))}else S(U,mxUtils.bind(this,function(){return null}))}else{ya=!1;if("image/png"==ca.type){var pa=da?null:this.extractGraphModelFromPng(na.target.result);if(null!=pa&&0<pa.length){var Aa=new Image;Aa.src=na.target.result;S(U,mxUtils.bind(this,function(){return t(pa,"text/xml",f+U*W,k+U*W,Aa.width,Aa.height,ca.name)}));ya=!0}}ya||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),
+mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(na.target.result,mxUtils.bind(this,function(xa){this.resizeImage(xa,na.target.result,mxUtils.bind(this,function(Ma,Oa,Na){S(U,mxUtils.bind(this,function(){if(null!=Ma&&Ma.length<y){var La=qa&&this.isResampleImageSize(ca.size,ia)?Math.min(1,Math.min(z/Oa,z/Na)):1;return t(Ma,ca.type,f+U*W,k+U*W,Math.round(Oa*La),Math.round(Na*La),ca.name)}this.handleError({message:mxResources.get("imageTooBig")});
+return null}))}),qa,z,ia,ca.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else ra=na.target.result,t(ra,ca.type,f+U*W,k+U*W,240,160,ca.name,function(xa){S(U,function(){return xa})},ca)});/(\.v(dx|sdx?))($|\?)/i.test(ca.name)||/(\.vs(x|sx?))($|\?)/i.test(ca.name)?t(null,ca.type,f+U*W,k+U*W,240,160,ca.name,function(na){S(U,function(){return na})},ca):"image"==ca.type.substring(0,5)||"application/pdf"==ca.type?ea.readAsDataURL(ca):ea.readAsText(ca)}})(ba)});
+if(sa){sa=[];for(V=0;V<e.length;V++)sa.push(e[V]);e=sa;this.confirmImageResize(function(Y){qa=Y;T()},J)}else T()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(e,f){f=null!=f?f:!1;var k=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},z=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():
+null,t=function(B,I){if(B||f)mxSettings.setResizeImages(B?I:null),mxSettings.save();k();e(I)};null==z||f?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(B){t(B,!0)},function(B){t(B,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,
+!0,!0):t(!1,z)};EditorUi.prototype.parseFile=function(e,f,k){k=null!=k?k:e.name;var z=new FileReader;z.onload=mxUtils.bind(this,function(){this.parseFileData(z.result,f,k)});z.readAsText(e)};EditorUi.prototype.parseFileData=function(e,f,k){var z=new XMLHttpRequest;z.open("POST",OPEN_URL);z.setRequestHeader("Content-Type","application/x-www-form-urlencoded");z.onreadystatechange=function(){f(z)};z.send("format=xml&filename="+encodeURIComponent(k)+"&data="+encodeURIComponent(e));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",
+action:"size_"+file.size})}catch(t){}};EditorUi.prototype.isResampleImageSize=function(e,f){f=null!=f?f:this.resampleThreshold;return e>f};EditorUi.prototype.resizeImage=function(e,f,k,z,t,B,I){t=null!=t?t:this.maxImageSize;var O=Math.max(1,e.width),J=Math.max(1,e.height);if(z&&this.isResampleImageSize(null!=I?I:f.length,B))try{var y=Math.max(O/t,J/t);if(1<y){var ia=Math.round(O/y),da=Math.round(J/y),ja=document.createElement("canvas");ja.width=ia;ja.height=da;ja.getContext("2d").drawImage(e,0,0,
+ia,da);var aa=ja.toDataURL();if(aa.length<f.length){var qa=document.createElement("canvas");qa.width=ia;qa.height=da;var sa=qa.toDataURL();aa!==sa&&(f=aa,O=ia,J=da)}}}catch(L){}k(f,O,J)};EditorUi.prototype.extractGraphModelFromPng=function(e){return Editor.extractGraphModelFromPng(e)};EditorUi.prototype.loadImage=function(e,f,k){try{var z=new Image;z.onload=function(){z.width=0<z.width?z.width:120;z.height=0<z.height?z.height:120;f(z)};null!=k&&(z.onerror=k);z.src=e}catch(t){if(null!=k)k(t);else throw t;
+}};EditorUi.prototype.getDefaultSketchMode=function(){var e="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:e)};var D=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&
+(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var e=this,f=this.editor.graph;Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(L){var V=L.getEvent();return null==L.getState()&&!mxEvent.isMouseEvent(V)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(V)&&(null==L.getState()||mxEvent.isControlDown(V)||mxEvent.isShiftDown(V))});f.cellEditor.editPlantUmlData=function(L,V,T){var Y=JSON.parse(T);V=new TextareaDialog(e,mxResources.get("plantUml")+
+":",Y.data,function(W){null!=W&&e.spinner.spin(document.body,mxResources.get("inserting"))&&e.generatePlantUmlImage(W,Y.format,function(ka,q,F){e.spinner.stop();f.getModel().beginUpdate();try{if("txt"==Y.format)f.labelChanged(L,"<pre>"+ka+"</pre>"),f.updateCellSize(L,!0);else{f.setCellStyles("image",e.convertDataUri(ka),[L]);var S=f.model.getGeometry(L);null!=S&&(S=S.clone(),S.width=q,S.height=F,f.cellsResized([L],[S],!1))}f.setAttributeForCell(L,"plantUmlData",JSON.stringify({data:W,format:Y.format}))}finally{f.getModel().endUpdate()}},
+function(ka){e.handleError(ka)})},null,null,400,220);e.showDialog(V.container,420,300,!0,!0);V.init()};f.cellEditor.editMermaidData=function(L,V,T){var Y=JSON.parse(T);V=new TextareaDialog(e,mxResources.get("mermaid")+":",Y.data,function(W){null!=W&&e.spinner.spin(document.body,mxResources.get("inserting"))&&e.generateMermaidImage(W,Y.config,function(ka,q,F){e.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",ka,[L]);var S=f.model.getGeometry(L);null!=S&&(S=S.clone(),S.width=Math.max(S.width,
+q),S.height=Math.max(S.height,F),f.cellsResized([L],[S],!1));f.setAttributeForCell(L,"mermaidData",JSON.stringify({data:W,config:Y.config},null,2))}finally{f.getModel().endUpdate()}},function(ka){e.handleError(ka)})},null,null,400,220);e.showDialog(V.container,420,300,!0,!0);V.init()};var k=f.cellEditor.startEditing;f.cellEditor.startEditing=function(L,V){try{var T=this.graph.getAttributeForCell(L,"plantUmlData");if(null!=T)this.editPlantUmlData(L,V,T);else if(T=this.graph.getAttributeForCell(L,"mermaidData"),
+null!=T)this.editMermaidData(L,V,T);else{var Y=f.getCellStyle(L);"1"==mxUtils.getValue(Y,"metaEdit","0")?e.showDataDialog(L):k.apply(this,arguments)}}catch(W){e.handleError(W)}};f.getLinkTitle=function(L){return e.getLinkTitle(L)};f.customLinkClicked=function(L){var V=!1;try{e.handleCustomLink(L),V=!0}catch(T){e.handleError(T)}return V};var z=f.parseBackgroundImage;f.parseBackgroundImage=function(L){var V=z.apply(this,arguments);null!=V&&null!=V.src&&Graph.isPageLink(V.src)&&(V={originalSrc:V.src});
+return V};var t=f.setBackgroundImage;f.setBackgroundImage=function(L){null!=L&&null!=L.originalSrc&&(L=e.createImageForPageLink(L.originalSrc,e.currentPage,this));t.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(L,V){L=null!=f.backgroundImage?f.backgroundImage.originalSrc:
+null;if(null!=L){var T=L.indexOf(",");if(0<T)for(L=L.substring(T+1),V=V.getProperty("patches"),T=0;T<V.length;T++)if(null!=V[T][EditorUi.DIFF_UPDATE]&&null!=V[T][EditorUi.DIFF_UPDATE][L]||null!=V[T][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(V[T][EditorUi.DIFF_REMOVE],L)){f.refreshBackgroundImage();break}}}));var B=f.getBackgroundImageObject;f.getBackgroundImageObject=function(L,V){var T=B.apply(this,arguments);if(null!=T&&null!=T.originalSrc)if(!V)T={src:T.originalSrc};else if(V&&null!=this.themes&&
+"darkTheme"==this.defaultThemeName){var Y=this.stylesheet,W=this.shapeForegroundColor,ka=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";T=e.createImageForPageLink(T.originalSrc);this.shapeBackgroundColor=ka;this.shapeForegroundColor=W;this.stylesheet=Y}return T};var I=this.clearDefaultStyle;this.clearDefaultStyle=function(){I.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||
+(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var O=e.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(L){L=null!=L?L:"";"1"==urlParams.dev&&(L+=(0<L.length?"&":"?")+"dev=1");return O.apply(this,arguments)};var J=f.addClickHandler;f.addClickHandler=function(L,V,T){var Y=V;
+V=function(W,ka){if(null==ka){var q=mxEvent.getSource(W);"a"==q.nodeName.toLowerCase()&&(ka=q.getAttribute("href"))}null!=ka&&f.isCustomLink(ka)&&(mxEvent.isTouchEvent(W)||!mxEvent.isPopupTrigger(W))&&f.customLinkClicked(ka)&&mxEvent.consume(W);null!=Y&&Y(W,ka)};J.call(this,L,V,T)};D.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var y=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(L,
+V,T){e.editor.graph.isSelectionEmpty()?y.apply(this,arguments):e.menus.addMenuItems(L,"delete - cut copy copyAsImage - duplicate".split(" "),null,T)}}e.actions.get("print").funct=function(){e.showDialog((new PrintDialog(e)).container,360,null!=e.pages&&1<e.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var ia=f.getExportVariables;f.getExportVariables=function(){var L=ia.apply(this,arguments),V=e.getCurrentFile();null!=V&&(L.filename=V.getTitle());L.pagecount=
+null!=e.pages?e.pages.length:1;L.page=null!=e.currentPage?e.currentPage.getName():"";L.pagenumber=null!=e.pages&&null!=e.currentPage?mxUtils.indexOf(e.pages,e.currentPage)+1:1;return L};var da=f.getGlobalVariable;f.getGlobalVariable=function(L){var V=e.getCurrentFile();return"filename"==L&&null!=V?V.getTitle():"page"==L&&null!=e.currentPage?e.currentPage.getName():"pagenumber"==L?null!=e.currentPage&&null!=e.pages?mxUtils.indexOf(e.pages,e.currentPage)+1:1:"pagecount"==L?null!=e.pages?e.pages.length:
+1:da.apply(this,arguments)};var ja=f.labelLinkClicked;f.labelLinkClicked=function(L,V,T){var Y=V.getAttribute("href");if(null==Y||!f.isCustomLink(Y)||!mxEvent.isTouchEvent(T)&&mxEvent.isPopupTrigger(T))ja.apply(this,arguments);else{if(!f.isEnabled()||null!=L&&f.isCellLocked(L.cell))f.customLinkClicked(Y),f.getRubberband().reset();mxEvent.consume(T)}};this.editor.getOrCreateFilename=function(){var L=e.defaultFilename,V=e.getCurrentFile();null!=V&&(L=null!=V.getTitle()?V.getTitle():L);return L};var aa=
+this.actions.get("print");aa.setEnabled(!mxClient.IS_IOS||!navigator.standalone);aa.visible=aa.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,
+!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,!0,"toggleShapes",!0),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,
+null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(L){var V=f.cellEditor.text2,T=null;null!=V&&(mxEvent.addListener(V,"dragleave",function(Y){null!=T&&(T.parentNode.removeChild(T),T=null);Y.stopPropagation();Y.preventDefault()}),mxEvent.addListener(V,"dragover",mxUtils.bind(this,function(Y){null==T&&(!mxClient.IS_IE||10<document.documentMode)&&(T=this.highlightElement(V));Y.stopPropagation();Y.preventDefault()})),mxEvent.addListener(V,"drop",mxUtils.bind(this,
+function(Y){null!=T&&(T.parentNode.removeChild(T),T=null);if(0<Y.dataTransfer.files.length)this.importFiles(Y.dataTransfer.files,0,0,this.maxImageSize,function(ka,q,F,S,ba,U){f.insertImage(ka,ba,U)},function(){},function(ka){return"image/"==ka.type.substring(0,6)},function(ka){for(var q=0;q<ka.length;q++)ka[q]()},mxEvent.isControlDown(Y));else if(0<=mxUtils.indexOf(Y.dataTransfer.types,"text/uri-list")){var W=Y.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(W)?this.loadImage(decodeURIComponent(W),
+mxUtils.bind(this,function(ka){var q=Math.max(1,ka.width);ka=Math.max(1,ka.height);var F=this.maxImageSize;F=Math.min(1,Math.min(F/Math.max(1,q)),F/Math.max(1,ka));f.insertImage(decodeURIComponent(W),q*F,ka*F)})):document.execCommand("insertHTML",!1,Y.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(Y.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,Y.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(Y.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",
+!1,Y.dataTransfer.getData("text/plain"));Y.stopPropagation();Y.preventDefault()})))}));this.isSettingsEnabled()&&(aa=this.editor.graph.view,aa.setUnit(mxSettings.getUnit()),aa.addListener("unitChanged",function(L,V){mxSettings.setUnit(V.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,aa.unit),this.refresh());if("1"==urlParams.styledev){aa=
+document.getElementById("geFooter");null!=aa&&(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)})),aa.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(L,V){0<this.editor.graph.getSelectionCount()?(L=this.editor.graph.getSelectionCell(),L=this.editor.graph.getModel().getStyle(L),this.styleInput.value=L||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var qa=this.isSelectionAllowed;this.isSelectionAllowed=function(L){return mxEvent.getSource(L)==this.styleInput?
+!0:qa.apply(this,arguments)}}aa=document.getElementById("geInfo");null!=aa&&aa.parentNode.removeChild(aa);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var sa=null;mxEvent.addListener(f.container,"dragleave",function(L){f.isEnabled()&&(null!=sa&&(sa.parentNode.removeChild(sa),sa=null),L.stopPropagation(),L.preventDefault())});mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(L){null==sa&&(!mxClient.IS_IE||10<document.documentMode)&&(sa=this.highlightElement(f.container));
+null!=this.sidebar&&this.sidebar.hideTooltip();L.stopPropagation();L.preventDefault()}));mxEvent.addListener(f.container,"drop",mxUtils.bind(this,function(L){null!=sa&&(sa.parentNode.removeChild(sa),sa=null);if(f.isEnabled()){var V=mxUtils.convertPoint(f.container,mxEvent.getClientX(L),mxEvent.getClientY(L)),T=L.dataTransfer.files,Y=f.view.translate,W=f.view.scale,ka=V.x/W-Y.x,q=V.y/W-Y.y;if(0<T.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(L)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&
+this.fileLoaded(null),this.openFiles(T,!0)):(mxEvent.isAltDown(L)&&(q=ka=null),this.importFiles(T,ka,q,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(L),null,null,mxEvent.isShiftDown(L),L));else{mxEvent.isAltDown(L)&&(q=ka=0);var F=0<=mxUtils.indexOf(L.dataTransfer.types,"text/uri-list")?L.dataTransfer.getData("text/uri-list"):null;V=this.extractGraphModelFromEvent(L,null!=this.pages);if(null!=V)f.setSelectionCells(this.importXml(V,ka,q,!0));else if(0<=mxUtils.indexOf(L.dataTransfer.types,
+"text/html")){var S=L.dataTransfer.getData("text/html");V=document.createElement("div");V.innerHTML=f.sanitizeHtml(S);var ba=null;T=V.getElementsByTagName("img");null!=T&&1==T.length?(S=T[0].getAttribute("src"),null==S&&(S=T[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(S)||(ba=!0)):(T=V.getElementsByTagName("a"),null!=T&&1==T.length?S=T[0].getAttribute("href"):(V=V.getElementsByTagName("pre"),null!=V&&1==V.length&&(S=mxUtils.getTextContent(V[0]))));var U=!0,ca=mxUtils.bind(this,
+function(){f.setSelectionCells(this.insertTextAt(S,ka,q,!0,ba,null,U,mxEvent.isControlDown(L)))});ba&&null!=S&&S.length>this.resampleThreshold?this.confirmImageResize(function(ea){U=ea;ca()},mxEvent.isControlDown(L)):ca()}else null!=F&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(F)?this.loadImage(decodeURIComponent(F),mxUtils.bind(this,function(ea){var na=Math.max(1,ea.width);ea=Math.max(1,ea.height);var ra=this.maxImageSize;ra=Math.min(1,Math.min(ra/Math.max(1,na)),ra/Math.max(1,ea));f.setSelectionCell(f.insertVertex(null,
+null,"",ka,q,na*ra,ea*ra,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+F+";"))}),mxUtils.bind(this,function(ea){f.setSelectionCells(this.insertTextAt(F,ka,q,!0))})):0<=mxUtils.indexOf(L.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(L.dataTransfer.getData("text/plain"),ka,q,!0))}}L.stopPropagation();L.preventDefault()}),!1)}f.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();
+aa=mxUtils.bind(this,function(){f.refresh();f.view.validateBackground();this.updateTabContainer();this.hideShapePicker()});this.addListener("darkModeChanged",aa);this.addListener("sketchModeChanged",aa);this.addListener("currentThemeChanged",mxUtils.bind(this,function(){this.refresh()}));"dark"==uiTheme?(this.doSetDarkMode(!0),this.fireEvent(new mxEventObject("darkModeChanged"))):("1"==urlParams["live-ui"]||"min"==uiTheme&&"1"!=urlParams.embedInline)&&this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&
+!mxClient.IS_IE&&!mxClient.IS_IE11:null!=mxSettings.settings.darkMode?mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var e=this.editor.graph;e.container.addEventListener("paste",mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var k=f.clipboardData||f.originalEvent.clipboardData,z=!1,t=0;t<k.types.length;t++)if("text/"===k.types[t].substring(0,
+5)){z=!0;break}if(!z){var B=k.items;for(index in B){var I=B[index];if("file"===I.kind){if(e.isEditing())this.importFiles([I.getAsFile()],0,0,this.maxImageSize,function(J,y,ia,da,ja,aa){e.insertImage(J,ja,aa)},function(){},function(J){return"image/"==J.type.substring(0,6)},function(J){for(var y=0;y<J.length;y++)J[y]()});else{var O=this.editor.graph.getInsertPoint();this.importFiles([I.getAsFile()],O.x,O.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(J){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=
+function(){function e(){window.setTimeout(function(){k.innerHTML="&nbsp;";k.focus();document.execCommand("selectAll",!1,null)},0)}var f=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="&nbsp;";var z=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(B){var I=mxEvent.getSource(B);
+null==f.container||!f.isEnabled()||f.isMouseDown||f.isEditing()||null!=this.dialog||"INPUT"==I.nodeName||"TEXTAREA"==I.nodeName||224!=B.keyCode&&(mxClient.IS_MAC||17!=B.keyCode)&&(!mxClient.IS_MAC||91!=B.keyCode&&93!=B.keyCode)||z||(k.style.left=f.container.scrollLeft+10+"px",k.style.top=f.container.scrollTop+10+"px",B=f.container.scrollLeft,I=f.container.scrollTop,f.container.appendChild(k),z=!0,k.focus(),document.execCommand("selectAll",!1,null),f.container.scrollLeft=B,f.container.scrollTop=I)}));
+mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(B){var I=B.keyCode;window.setTimeout(mxUtils.bind(this,function(){!z||224!=I&&17!=I&&91!=I&&93!=I||(z=!1,f.isEditing()||null!=this.dialog||null==f.container||f.container.focus(),k.parentNode.removeChild(k),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(k,"copy",mxUtils.bind(this,function(B){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(k),e()}catch(I){this.handleError(I)}}));mxEvent.addListener(k,"cut",
+mxUtils.bind(this,function(B){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(k,!0),e()}catch(I){this.handleError(I)}}));mxEvent.addListener(k,"paste",mxUtils.bind(this,function(B){if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&(k.innerHTML="&nbsp;",k.focus(),null!=B.clipboardData&&this.pasteCells(B,k,!0,!0),!mxEvent.isConsumed(B))){var I=f.container.scrollLeft,O=f.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){f.container.scrollLeft=I;f.container.scrollTop=O;
+this.pasteCells(B,k,!1,!0)}),0)}}),!0);var t=this.isSelectionAllowed;this.isSelectionAllowed=function(B){return mxEvent.getSource(B)==k?!0:t.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(e,f){mxSettings.setUi(e);(f=this.doSetCurrentTheme(e)||f)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.doSetCurrentTheme=function(e,f){function k(da){return""==da||"dark"==da||"kennedy"==da||null==da}var z=Editor.currentTheme;e=k(e)?"default":e;z=k(z)?"default":
+z;var t="sketch"==z&&"default"==e||"default"==z&&"sketch"==e;if(t&&"1"==urlParams["live-ui"]&&!this.themeSwitching){Editor.currentTheme=e;this.themeSwitching=!0;var B=this.editor.graph.view.translate,I=B.x,O=B.y,J=mxUtils.getOffset(this.editor.graph.container),y=this.editor.graph.container.scrollLeft-J.x,ia=this.editor.graph.container.scrollTop-J.y;f=null!=f?f:100;mxUtils.setPrefixedStyle(this.container.style,"transition","all "+f+"ms");0==f&&(this.container.style.opacity="0");window.setTimeout(mxUtils.bind(this,
+function(){this.container.style.opacity="0";window.setTimeout(mxUtils.bind(this,function(){"sketch"==z&&"default"==e?(this.sidebarFooterContainer.style.display="block",this.menubarContainer.style.display="block",this.toolbarContainer.style.display="block",this.tabContainer.style.display="block",this.hsplit.style.display="block",this.hsplitPosition=EditorUi.prototype.hsplitPosition,this.menubarHeight=App.prototype.menubarHeight,this.formatWidth=EditorUi.prototype.formatWidth):"default"==z&&"sketch"==
+e&&(this.sidebarFooterContainer.style.display="none",this.menubarContainer.style.display="none",this.toolbarContainer.style.display="none",this.tabContainer.style.display="none",this.hsplit.style.display="none",this.formatWidth=this.menubarHeight=this.hsplitPosition=0);this.switchTheme(e);window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("currentThemeChanged"));this.editor.graph.refresh();var da=this.editor.graph.view.scale;J=mxUtils.getOffset(this.editor.graph.container);
+this.editor.graph.container.scrollLeft=y+J.x+(B.x-I)*da;this.editor.graph.container.scrollTop=ia+J.y+(B.y-O)*da;this.container.style.opacity="";window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.container.style,"transition",null);delete this.themeSwitching}),f)}),f)}),f)}),0)}return t};EditorUi.prototype.switchTheme=function(e){this.destroyWindows();this.updateUserElement();this.updateDefaultStyles();this.switchThemeConstants(e);this.switchCssForTheme(e);this.createWrapperForTheme(e);
+this.createPickerMenuForTheme(e);this.createMainMenuForTheme(e);this.createMenubarForTheme(e);this.createFooterMenuForTheme(e);this.sidebarContainer.style.display="";"sketch"==e?(this.createFormatWindow(),this.formatContainer.style.left="0px",this.formatContainer.style.top="0px",this.formatContainer.style.width="",this.createShapesWindow(),this.sidebarContainer.style.left="0px",this.sidebarContainer.style.top="0px",this.sidebarContainer.style.bottom="0px",this.sidebarContainer.style.width="100%"):
+"default"==e&&null!=this.formatContainer&&(this.formatContainer.style.left="",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));null!=this.format&&(e="default"==e||"atlas"==e,this.format.showCloseButton!=
+e&&(this.format.showCloseButton=e,this.format.refresh()))};EditorUi.prototype.destroyWindows=function(){null!=this.sidebarWindow&&(this.sidebarWindow.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.destroy(),this.formatWindow=null);null!=this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),
+this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null);null!=this.menus.commentsWindow&&(this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null)};EditorUi.prototype.switchThemeConstants=function(e){var f=this.editor.graph;
+f.defaultEdgeLength=Graph.prototype.defaultEdgeLength;f.defaultGridEnabled=Graph.prototype.defaultGridEnabled;f.defaultPageVisible=Graph.prototype.defaultPageVisible;"sketch"==e?(mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src,mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src,mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,
+10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src,Editor.fitWindowBorders=new mxRectangle(60,30,30,30),f.defaultEdgeLength=120,null==urlParams.grid&&(f.defaultGridEnabled=!1),null==urlParams.pv&&(f.defaultPageVisible=!1)):(mxWindow.prototype.closeImage=mxClient.imageBasePath+"/close.gif",mxWindow.prototype.minimizeImage=mxClient.imageBasePath+"/minimize.gif",mxWindow.prototype.normalizeImage=mxClient.imageBasePath+"/normalize.gif",Editor.fitWindowBorders=null)};
+EditorUi.prototype.switchCssForTheme=function(e){"sketch"==e?null==this.sketchStyleElt&&(this.sketchStyleElt=document.createElement("style"),this.sketchStyleElt.setAttribute("type","text/css"),this.sketchStyleElt.innerHTML=Editor.createMinimalCss(),document.getElementsByTagName("head")[0].appendChild(this.sketchStyleElt)):null!=this.sketchStyleElt&&(this.sketchStyleElt.parentNode.removeChild(this.sketchStyleElt),this.sketchStyleElt=null)};EditorUi.prototype.createWrapperForTheme=function(e){"sketch"==
+e?(null==this.sketchWrapperElt&&(this.sketchWrapperElt=document.createElement("div"),this.sketchWrapperElt.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;"),this.diagramContainer.parentNode.appendChild(this.sketchWrapperElt),this.sketchWrapperElt.appendChild(this.diagramContainer)):null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode&&(this.tabContainer.parentNode.insertBefore(this.diagramContainer,this.tabContainer),this.sketchWrapperElt.parentNode.removeChild(this.sketchWrapperElt))};
+EditorUi.prototype.createMainMenuForTheme=function(e){if("sketch"==e&&null==this.sketchMainMenuElt){this.sketchMainMenuElt=document.createElement("div");this.sketchMainMenuElt.className="geToolbarContainer";this.sketchMainMenuElt.style.cssText="position:absolute;left:10px;top:10px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;";this.sketchMainMenuElt.appendChild(this.createMenu("diagram",
+Editor.menuImage));this.sketchMainMenuElt.appendChild(this.createMenuItem("delete",Editor.trashImage));var f=this.sketchMainMenuElt.appendChild(this.createMenuItem("undo",Editor.undoImage)),k=this.sketchMainMenuElt.appendChild(this.createMenuItem("redo",Editor.redoImage));e=mxUtils.bind(this,function(){f.style.display=0<this.editor.undoManager.history.length||this.editor.graph.isEditing()?"inline-block":"none";k.style.display=f.style.display});this.actions.get("undo").addListener("stateChanged",e);
+this.actions.get("redo").addListener("stateChanged",e);e();this.sketchWrapperElt.appendChild(this.sketchMainMenuElt)}};EditorUi.prototype.createFooterMenuForTheme=function(e){if("sketch"==e&&null==this.sketchFooterMenuElt){this.sketchFooterMenuElt=document.createElement("div");this.sketchFooterMenuElt.className="geToolbarContainer";this.sketchFooterMenuElt.style.cssText="position:absolute;right:12px;bottom:12px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;";
+e=this.sketchFooterMenuElt;var f=this.createPageMenuTab(!1,!0);f.className="geToolbarButton";f.style.cssText="display:inline-block;cursor:pointer;overflow:hidden;padding:4px;white-space:nowrap;max-width:160px;text-overflow:ellipsis;filter:none;opacity:1;";e.appendChild(f);var k=mxUtils.bind(this,function(){f.innerText="";if(null!=this.currentPage){mxUtils.write(f,this.currentPage.getName());var z=null!=this.pages?this.pages.length:1,t=this.getPageIndex(this.currentPage);t=null!=t?t+1:1;var B=this.currentPage.getId();
+f.setAttribute("title",this.currentPage.getName()+" ("+t+"/"+z+")"+(null!=B?" ["+B+"]":""))}});this.editor.addListener("pagesPatched",k);this.editor.addListener("pageSelected",k);this.editor.addListener("pageRenamed",k);this.editor.addListener("fileLoaded",k);k();k=mxUtils.bind(this,function(){f.style.display=null!=this.pages&&("0"!=urlParams.pages||1<this.pages.length||Editor.pagesVisible)?"inline-block":"none"});this.addListener("fileDescriptorChanged",k);this.addListener("pagesVisibleChanged",
+k);this.editor.addListener("pagesPatched",k);k();e.appendChild(this.createMenuItem("zoomOut",Editor.zoomOutImage));k=this.createMenu("viewZoom",Editor.plusImage);k.setAttribute("title",mxResources.get("zoom"));k.innerHTML="100%";k.className="geToolbarButton";k.style.cssText="display:inline-block;position:relative;vertical-align:top;opacity:1;color:inherit;padding:4px;box-shadow:none;width:40px;text-align:center;margin-right:-6px;filter:none;";e.appendChild(k);mxUtils.bind(this,function(z){mxEvent.addListener(z,
+"click",mxUtils.bind(this,function(B){mxEvent.isAltDown(B)?(this.hideCurrentMenu(),this.actions.get("customZoom").funct(),mxEvent.consume(B)):mxEvent.isShiftDown(B)&&(this.hideCurrentMenu(),this.actions.get("smartFit").funct(),mxEvent.consume(B))}));var t=mxUtils.bind(this,function(){z.innerText="";mxUtils.write(z,Math.round(100*this.editor.graph.view.scale)+"%")});this.editor.graph.view.addListener(mxEvent.EVENT_SCALE,t);this.editor.addListener("resetGraphView",t);this.editor.addListener("pageSelected",
+t)})(k);e.appendChild(this.createMenuItem("zoomIn",Editor.zoomInImage));this.sketchWrapperElt.appendChild(this.sketchFooterMenuElt)}};EditorUi.prototype.createPickerMenuForTheme=function(e){if("sketch"==e&&null==this.sketchPickerMenuElt){this.sketchPickerMenuElt=document.createElement("div");this.sketchPickerMenuElt.className="geToolbarContainer";this.sketchPickerMenuElt.style.cssText="position:absolute;left:10px;border-radius:4px;padding:0px 4px 4px;white-space:nowrap;z-index:1;transform:translate(0, -50%);top:50%;user-select:none;width:40px;";
+var f=this.sketchPickerMenuElt;mxUtils.setPrefixedStyle(f.style,"transition","transform .3s ease-out");var k=document.createElement("a");k.style.padding="0px";k.style.boxShadow="none";k.className="geMenuItem";k.style.display="block";k.style.width="100%";k.style.height="14px";k.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";k.style.backgroundPosition="top center";k.style.backgroundRepeat="no-repeat";k.setAttribute("title","Minimize");var z=this.createMenuItem("insertFreehand",Editor.freehandImage,
+!0);z.style.paddingLeft="12px";z.style.backgroundSize="";z.style.width="26px";z.style.height="30px";z.style.opacity="0.7";var t=this.createMenu("insert",Editor.plusImage);t.style.backgroundSize="";t.style.marginBottom="4px";t.style.display="block";t.style.width="30px";t.style.height="30px";t.style.padding="4px";t.style.opacity="0.7";var B=!1,I=mxUtils.bind(this,function(){f.innerText="";if(!B){var O=function(y,ia,da,ja){null!=ia&&y.setAttribute("title",ia);y.style.cursor="pointer";y.style.margin=
+"8px 0px";y.style.display="block";f.appendChild(y);null!=ja&&(y.style.position="relative",y.style.overflow="visible",ia=document.createElement("div"),ia.style.position="absolute",ia.style.fontSize="8px",ia.style.left="32px",ia.style.top="28px",mxUtils.write(ia,ja),y.appendChild(ia));return y};O(this.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+
+" (A)",null,"A");O(this.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");O(this.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle")+" (D)",
+!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");O(this.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");var J=new mxCell("",new mxGeometry(0,0,this.editor.graph.defaultEdgeLength+20,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");J.geometry.setTerminalPoint(new mxPoint(0,0),!0);J.geometry.setTerminalPoint(new mxPoint(J.geometry.width,0),!1);J.geometry.points=
+[];J.geometry.relative=!0;J.edge=!0;O(this.sidebar.createEdgeTemplateFromCells([J],J.geometry.width,J.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");J=J.clone();J.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";J.geometry.width=this.editor.graph.defaultEdgeLength+20;J.geometry.setTerminalPoint(new mxPoint(0,20),!0);J.geometry.setTerminalPoint(new mxPoint(J.geometry.width,20),!1);
+O(this.sidebar.createEdgeTemplateFromCells([J],J.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));O(z,mxResources.get("freehand")+" (X)",null,"X");this.sketchPickerMenuElt.appendChild(t)}"1"!=urlParams.embedInline&&f.appendChild(k)});mxEvent.addListener(k,"click",mxUtils.bind(this,function(){B?(mxUtils.setPrefixedStyle(f.style,"transform","translate(0, -50%)"),f.style.padding="8px 6px 4px",f.style.width="40px",f.style.top="50%",f.style.bottom="",f.style.height="",
+k.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",k.setAttribute("title","Minimize"),k.style.height="14px",B=!1,I()):(f.innerText="",f.appendChild(k),mxUtils.setPrefixedStyle(f.style,"transform","translate(0, 0)"),f.style.bottom="12px",f.style.padding="0px",f.style.height="24px",f.style.width="24px",f.style.top="",k.style.backgroundImage="url("+Editor.plusImage+")",k.setAttribute("title",mxResources.get("insert")),k.style.height="24px",B=!0)}));this.addListener("darkModeChanged",
+I);this.addListener("sketchModeChanged",I);I();this.sketchWrapperElt.appendChild(this.sketchPickerMenuElt)}};EditorUi.prototype.createMenubarForTheme=function(e){"sketch"==e?(null==this.sketchMenubarElt&&(this.sketchMenubarElt=document.createElement("div"),this.sketchMenubarElt.className="geToolbarContainer",this.sketchMenubarElt.style.cssText="position:absolute;right:12px;top:10px;height:44px;border-radius:4px;padding:7px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;",
+this.sketchWrapperElt.appendChild(this.sketchMenubarElt)),null!=this.statusContainer&&(this.sketchMenubarElt.appendChild(this.statusContainer),this.statusContainer.style.marginTop="4px"),null!=this.userElement&&this.sketchMenubarElt.appendChild(this.userElement),e=this.menubar.langIcon,null!=e&&(e.style.position="relative",e.style.height="21px",e.style.width="21px",e.style.right="0px",e.style.top="3px",this.sketchMenubarElt.appendChild(e))):(null!=this.statusContainer&&(this.menubar.container.appendChild(this.statusContainer),
+this.statusContainer.style.marginTop=""),null!=this.userElement&&this.menubarContainer.appendChild(this.userElement),e=this.menubar.langIcon,null!=e&&(e.style.position="absolute",e.style.height="18px",e.style.width="18px",e.style.right="14px",e.style.top="5px",document.body.appendChild(e)))};EditorUi.prototype.createMenu=function(e,f){var k=this.menus.get(e),z=this.menubar.addMenu(mxResources.get(e),k.funct);z.className="geToolbarButton";z.style.display="inline-block";z.style.cursor="pointer";z.style.height=
+"24px";z.setAttribute("title",mxResources.get(e));this.menus.menuCreated(k,z,"geMenuItem");null!=f&&(z.style.backgroundImage="url("+f+")",z.style.backgroundPosition="center center",z.style.backgroundRepeat="no-repeat",z.style.backgroundSize="100% 100%",z.style.width="24px",z.innerText="");return z};EditorUi.prototype.createMenuItem=function(e,f,k){var z=document.createElement("a");z.className="geToolbarButton";z.setAttribute("title",mxResources.get(e));z.style.backgroundImage="url("+f+")";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="24px";z.style.height="24px";var t=this.actions.get(e);null!=t&&(mxEvent.addListener(z,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(B){B.preventDefault()})),mxEvent.addListener(z,"click",function(B){"disabled"!=z.getAttribute("disabled")&&t.funct(B);mxEvent.consume(B)}),k||(e=function(){t.isEnabled()?
+(z.removeAttribute("disabled"),z.style.cursor="pointer"):(z.setAttribute("disabled","disabled"),z.style.cursor="default");z.style.opacity=t.isEnabled()?"":"0.2"},this.editor.graph.addListener("enabledChanged",e),t.addListener("stateChanged",e),e()));return z};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var e=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),f="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60,k="1"==urlParams.embedInline?580:"1"==urlParams.sketch?
+580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),e,f,240,k,mxUtils.bind(this,function(z){z.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);this.formatWindow.window.setVisible(!1)}};var p=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=
+function(e){var f=this.formatWindow;null!=f?f.window.setVisible(null!=e?e:!this.isFormatPanelVisible()):p.apply(this,arguments)};var E=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var e=this.formatWindow;return null!=e?e.window.isVisible():E.apply(this,arguments)};var N=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(e){null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode?(this.diagramContainer.style.left="0",this.diagramContainer.style.top=
+"0",this.diagramContainer.style.right="0",this.diagramContainer.style.bottom="0",(null!=e?e:1)&&this.editor.graph.sizeDidChange()):N.apply(this,arguments)};EditorUi.prototype.createShapesWindow=function(){if(null==this.sidebarWindow){var e=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),f="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,650);this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),"sketch"==Editor.currentTheme&&"1"!=urlParams.embedInline?
+66:10,"sketch"==Editor.currentTheme&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-f)/2):56,e-6,f-6,mxUtils.bind(this,function(k){k.appendChild(this.sidebarContainer)}));this.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);this.sidebarWindow.window.setVisible(!1)}};EditorUi.prototype.setSketchMode=function(e){this.spinner.spin(document.body,
+mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(e);null==urlParams.rough&&(mxSettings.settings.sketchMode=e,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }html body .mxCellEditor { color: #f0f0f0; }":
"html > body > div > .geToolbarContainer { box-shadow:0px 0px 3px 1px #c0c0c0; }html body div.geToolbarContainer a.geInverted { filter: invert(1); }html body.geEditor .geTabContainer div { border-color: #e5e5e5 !important; }")+'html > body > div > a.geItem { background-color: #ffffff; color: #707070; border-top: 1px solid lightgray; border-left: 1px solid lightgray; }html body .geMenubarContainer { border-bottom:1px solid lightgray;background-color:#ffffff; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body .geSidebarContainer *:not(svg *) { font-size:9pt; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * :not(svg *) { font-size:13px; }html body .mxWindow { z-index: 3; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700; border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select: none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }.geStatus > div { box-sizing: border-box; max-width: 100%; text-overflow: ellipsis; }html body .geMenubarContainer .geStatus { margin-top: 0px !important; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity: 0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding: 2px; display: inline-block; }html body .mxWindow input[type="checkbox"] {padding: 0px; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: '+
(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; border: none !important; }html body .geToolbarContainer a div { color: "+(Editor.isDarkMode()?"#707070":Editor.darkColor)+" }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: "+(Editor.isDarkMode()?
"#cccccc":"#353535")+" !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:0px; padding: 0 2px 4px 2px; } html body div.geToolbarContainer a.geColorBtn { margin: 2px; } html body .mxWindow td.mxWindowPane input, html body .mxWindow td.mxWindowPane select, html body .mxWindow td.mxWindowPane textarea, html body .mxWindow td.mxWindowPane radio { padding: 0px; box-sizing: border-box; }.geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }.mxWindowPane > .geSidebarContainer { border: none !important; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); "+
@@ -3710,456 +3712,456 @@ mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(
"; }div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:"+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow *:not(svg *) { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: "+
(Editor.isDarkMode()?Editor.darkColor:"rgb(249, 249, 249)")+" !important; color: #A0A0A0 !important; } html div.geActivePage { background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; "+(Editor.isDarkMode()?"":"color: #353535 !important; } ")+"html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.4) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: "+
(Editor.isDarkMode()?"#cccccc":"#353535")+"; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: "+(Editor.isDarkMode()?"#000000":"#29b6f2")+"; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: "+(Editor.isDarkMode()?"#cccccc":"#ffffff")+" !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }html body td.mxWindowTitle { padding-right: 14px; }html td.mxWindowTitle div { top: 0px !important; }"+
-(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"")+("1"==urlParams.sketch?"a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }":"")};EditorUi.prototype.setDarkMode=function(d){this.doSetDarkMode(d);null==urlParams.dark&&(mxSettings.settings.darkMode=d,mxSettings.save());this.fireEvent(new mxEventObject("darkModeChanged"))};var p=document.createElement("link");p.setAttribute("rel","stylesheet");p.setAttribute("href",STYLE_PATH+"/dark.css");
-p.setAttribute("charset","UTF-8");p.setAttribute("type","text/css");EditorUi.prototype.doSetDarkMode=function(d){if(Editor.darkMode!=d){var f=this.editor.graph;Editor.darkMode=d;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";f.view.defaultGridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultDarkGridColor:mxGraphView.prototype.defaultGridColor;f.view.gridColor=f.view.defaultGridColor;f.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:
+(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"")+("1"==urlParams.sketch?"a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }":"")};EditorUi.prototype.setDarkMode=function(e){this.doSetDarkMode(e);null==urlParams.dark&&(mxSettings.settings.darkMode=e,mxSettings.save());this.fireEvent(new mxEventObject("darkModeChanged"))};var R=document.createElement("link");R.setAttribute("rel","stylesheet");R.setAttribute("href",STYLE_PATH+"/dark.css");
+R.setAttribute("charset","UTF-8");R.setAttribute("type","text/css");EditorUi.prototype.doSetDarkMode=function(e){if(Editor.darkMode!=e){var f=this.editor.graph;Editor.darkMode=e;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";f.view.defaultGridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultDarkGridColor:mxGraphView.prototype.defaultGridColor;f.view.gridColor=f.view.defaultGridColor;f.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:
"#ffffff";f.defaultPageBorderColor=Editor.isDarkMode()?"#505759":"#ffffff";f.shapeBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"#ffffff";f.shapeForegroundColor=Editor.isDarkMode()?Editor.lightColor:"#000000";f.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";f.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";document.body.style.backgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";f.loadStylesheet();null!=this.actions.layersWindow&&
-(d=this.actions.layersWindow.window.isVisible(),this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),this.actions.layersWindow=null,d&&window.setTimeout(this.actions.get("layers").funct,0));null!=this.menus.commentsWindow&&(this.menus.commentsWindow.window.setVisible(!1),this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null);null!=this.ruler&&this.ruler.updateStyle();Graph.prototype.defaultPageBackgroundColor=f.defaultPageBackgroundColor;Graph.prototype.defaultPageBorderColor=
+(e=this.actions.layersWindow.window.isVisible(),this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),this.actions.layersWindow=null,e&&window.setTimeout(this.actions.get("layers").funct,0));null!=this.menus.commentsWindow&&(this.menus.commentsWindow.window.setVisible(!1),this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null);null!=this.ruler&&this.ruler.updateStyle();Graph.prototype.defaultPageBackgroundColor=f.defaultPageBackgroundColor;Graph.prototype.defaultPageBorderColor=
f.defaultPageBorderColor;Graph.prototype.shapeBackgroundColor=f.shapeBackgroundColor;Graph.prototype.shapeForegroundColor=f.shapeForegroundColor;Graph.prototype.defaultThemeName=f.defaultThemeName;StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"white";Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0";Dialog.backdropColor=Editor.isDarkMode()?Editor.darkColor:
-"white";mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000FF";Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;null!=this.sketchStyleElt?this.sketchStyleElt.innerHTML=Editor.createMinimalCss():null!=Editor.styleElt&&(Editor.styleElt.innerHTML=Editor.createMinimalCss());Editor.isDarkMode()?null==p.parentNode&&document.getElementsByTagName("head")[0].appendChild(p):
-null!=p.parentNode&&p.parentNode.removeChild(p)}};EditorUi.prototype.setPagesVisible=function(d){Editor.pagesVisible!=d&&(Editor.pagesVisible=d,mxSettings.settings.pagesVisible=d,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(d,f){this.sidebar.sidebarTitles!=d&&(this.sidebar.sidebarTitles=d,this.sidebar.refresh(),this.isSettingsEnabled()&&f&&(mxSettings.settings.sidebarTitles=d,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};
-EditorUi.prototype.setInlineFullscreen=function(d){Editor.inlineFullscreen!=d&&(Editor.inlineFullscreen=d,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(d){if(Editor.sketchMode!=
-d){var f=function(x,y,t){null==x[y]&&(x[y]=t)},g=this.editor.graph;Editor.sketchMode=d;this.menus.defaultFontSize=d?20:16;g.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);f(g.defaultVertexStyle,"fontSize",this.menus.defaultFontSize);g.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);f(g.defaultEdgeStyle,"fontSize",this.menus.defaultFontSize-4);f(g.defaultEdgeStyle,"edgeStyle","none");f(g.defaultEdgeStyle,"rounded","0");f(g.defaultEdgeStyle,"curved","1");f(g.defaultEdgeStyle,
-"jettySize","auto");f(g.defaultEdgeStyle,"orthogonalLoop","1");f(g.defaultEdgeStyle,"endArrow","open");f(g.defaultEdgeStyle,"endSize","14");f(g.defaultEdgeStyle,"startSize","14");d&&(f(g.defaultVertexStyle,"fontFamily",Editor.sketchFontFamily),f(g.defaultVertexStyle,"fontSource",Editor.sketchFontSource),f(g.defaultVertexStyle,"hachureGap","4"),f(g.defaultVertexStyle,"sketch","1"),f(g.defaultEdgeStyle,"fontFamily",Editor.sketchFontFamily),f(g.defaultEdgeStyle,"fontSource",Editor.sketchFontSource),
-f(g.defaultEdgeStyle,"sketch","1"),f(g.defaultEdgeStyle,"hachureGap","4"),f(g.defaultEdgeStyle,"sourcePerimeterSpacing","8"),f(g.defaultEdgeStyle,"targetPerimeterSpacing","8"));g.currentVertexStyle=mxUtils.clone(g.defaultVertexStyle);g.currentEdgeStyle=mxUtils.clone(g.defaultEdgeStyle);this.clearDefaultStyle()}};EditorUi.prototype.getLinkTitle=function(d){var f=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(d)){var g=d.indexOf(",");0<g&&(f=this.getPageById(d.substring(g+1)),
-f=null!=f?f.getName():mxResources.get("pageNotFound"))}else"data:"==d.substring(0,5)&&(f=mxResources.get("action"));return f};EditorUi.prototype.handleCustomLink=function(d){if(Graph.isPageLink(d)){var f=d.indexOf(",");if(d=this.getPageById(d.substring(f+1)))this.selectPage(d);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(d)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||
-mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){Editor.pagesVisible=mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(d){d.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(d){}this.fireEvent(new mxEventObject("styleChanged",
-"keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(d,f){"1"!=urlParams["ext-fonts"]?mxSettings.setCustomFonts(this.menus.customFonts):(d=f.getProperty("customFonts"),this.menus.customFonts=d,mxSettings.setCustomFonts(d));mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",
-mxUtils.bind(this,function(d,f){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(d,f){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=
-mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);this.addListener("gridColorChanged",mxUtils.bind(this,function(d,f){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(d,f){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=
-this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);
-mxSettings.save()})}};EditorUi.prototype.copyImage=function(d,f,g){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(x,y){try{this.spinner.stop();var t=this.createImageDataUri(x,f,"png"),G=parseInt(y.getAttribute("width")),D=parseInt(y.getAttribute("height"));this.writeImageToClipboard(t,G,D,mxUtils.bind(this,function(I){this.handleError(I)}))}catch(I){this.handleError(I)}}),null,null,null,mxUtils.bind(this,
-function(x){this.spinner.stop();this.handleError(x)}),null,null,null!=g?g:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<d.length?d:null)}catch(x){this.handleError(x)}};EditorUi.prototype.writeImageToClipboard=function(d,f,g,x){var y=this.base64ToBlob(d.substring(d.indexOf(",")+1),"image/png");d=new ClipboardItem({"image/png":y,"text/html":new Blob(['<img src="'+d+'" width="'+f+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([d])["catch"](x)};
-EditorUi.prototype.copyCells=function(d,f){var g=this.editor.graph;if(g.isSelectionEmpty())d.innerText="";else{var x=mxUtils.sortCells(g.model.getTopmostCells(g.getSelectionCells())),y=mxUtils.getXml(g.encodeCells(x));mxUtils.setTextContent(d,encodeURIComponent(y));f?(g.removeCells(x,!1),g.lastPasteXml=null):(g.lastPasteXml=y,g.pasteCounter=0);d.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var d=null;if(Editor.enableNativeCipboard){var f=this.editor.graph;
-f.isSelectionEmpty()||(d=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),f=mxUtils.getXml(f.encodeCells(d)),navigator.clipboard.writeText(f))}return d};EditorUi.prototype.pasteXml=function(d,f,g,x){var y=this.editor.graph,t=null;y.lastPasteXml==d?y.pasteCounter++:(y.lastPasteXml=d,y.pasteCounter=0);var G=y.pasteCounter*y.gridSize;if(g||this.isCompatibleString(d))t=this.importXml(d,G,G),y.setSelectionCells(t);else if(f&&1==y.getSelectionCount()){G=y.getStartEditingCell(y.getSelectionCell(),
-x);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==y.getCurrentCellStyle(G)[mxConstants.STYLE_SHAPE])y.setCellStyles(mxConstants.STYLE_IMAGE,d,[G]);else{y.model.beginUpdate();try{y.labelChanged(G,d),Graph.isLink(d)&&y.setLinkForCell(G,d)}finally{y.model.endUpdate()}}y.setSelectionCell(G)}else t=y.getInsertPoint(),y.isMouseInsertPoint()&&(G=0,y.lastPasteXml==d&&0<y.pasteCounter&&y.pasteCounter--),t=this.insertTextAt(d,t.x+G,t.y+G,!0),y.setSelectionCells(t);y.isSelectionEmpty()||(y.scrollCellToVisible(y.getSelectionCell()),
-null!=this.hoverIcons&&this.hoverIcons.update(y.view.getState(y.getSelectionCell())));return t};EditorUi.prototype.pasteCells=function(d,f,g,x){if(!mxEvent.isConsumed(d)){var y=f,t=!1;if(g&&null!=d.clipboardData&&d.clipboardData.getData){var G=d.clipboardData.getData("text/plain"),D=!1;if(null!=G&&0<G.length&&"%3CmxGraphModel%3E"==G.substring(0,18))try{var I=decodeURIComponent(G);this.isCompatibleString(I)&&(D=!0,G=I)}catch(la){}D=D?null:d.clipboardData.getData("text/html");null!=D&&0<D.length?(y=
-this.parseHtmlData(D),t="text/plain"!=y.getAttribute("data-type")):null!=G&&0<G.length&&(y=document.createElement("div"),mxUtils.setTextContent(y,D))}G=y.getElementsByTagName("span");if(null!=G&&0<G.length&&"application/vnd.lucid.chart.objects"===G[0].getAttribute("data-lucid-type"))g=G[0].getAttribute("data-lucid-content"),null!=g&&0<g.length&&(this.convertLucidChart(g,mxUtils.bind(this,function(la){var ra=this.editor.graph;ra.lastPasteXml==la?ra.pasteCounter++:(ra.lastPasteXml=la,ra.pasteCounter=
-0);var ba=ra.pasteCounter*ra.gridSize;ra.setSelectionCells(this.importXml(la,ba,ba));ra.scrollCellToVisible(ra.getSelectionCell())}),mxUtils.bind(this,function(la){this.handleError(la)})),mxEvent.consume(d));else{var H=t?y.innerHTML:mxUtils.trim(null==y.innerText?mxUtils.getTextContent(y):y.innerText),S=!1;try{var T=H.lastIndexOf("%3E");0<=T&&T<H.length-3&&(H=H.substring(0,T+3))}catch(la){}try{G=y.getElementsByTagName("span"),(I=null!=G&&0<G.length?mxUtils.trim(decodeURIComponent(G[0].textContent)):
-decodeURIComponent(H))&&(this.isCompatibleString(I)||0==I.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(S=!0,H=I)}catch(la){}try{if(null!=H&&0<H.length){if(0==H.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var M=mxUtils.bind(this,function(){try{H=(new MiroImporter).importMiroJson(JSON.parse(H)),this.pasteXml(H,x,S,d)}catch(la){console.log("Miro import error:",la)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",M):M()}else this.pasteXml(H,
-x,S,d);try{mxEvent.consume(d)}catch(la){}}else if(!g){var fa=this.editor.graph;fa.lastPasteXml=null;fa.pasteCounter=0}}catch(la){this.handleError(la)}}}f.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(d){if(Graph.fileSupport)for(var f=null,g=0;g<d.length;g++)mxEvent.addListener(d[g],"dragleave",function(x){null!=f&&(f.parentNode.removeChild(f),f=null);x.stopPropagation();x.preventDefault()}),mxEvent.addListener(d[g],"dragover",mxUtils.bind(this,function(x){(this.editor.graph.isEnabled()||
-"1"!=urlParams.embed)&&null==f&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(f=this.highlightElement());x.stopPropagation();x.preventDefault()})),mxEvent.addListener(d[g],"drop",mxUtils.bind(this,function(x){null!=f&&(f.parentNode.removeChild(f),f=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<x.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(x.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(x)&&
-!mxEvent.isShiftDown(x)):this.openFiles(x.dataTransfer.files,!0);else{var y=this.extractGraphModelFromEvent(x);if(null==y){var t=null!=x.dataTransfer?x.dataTransfer:x.clipboardData;null!=t&&(10==document.documentMode||11==document.documentMode?y=t.getData("Text"):(y=null,y=0<=mxUtils.indexOf(t.types,"text/uri-list")?x.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(t.types,"text/html")?t.getData("text/html"):null,null!=y&&0<y.length?(t=document.createElement("div"),t.innerHTML=this.editor.graph.sanitizeHtml(y),
-t=t.getElementsByTagName("img"),0<t.length&&(y=t[0].getAttribute("src"))):0<=mxUtils.indexOf(t.types,"text/plain")&&(y=t.getData("text/plain"))),null!=y&&(Editor.isPngDataUrl(y)?(y=Editor.extractGraphModelFromPng(y),null!=y&&0<y.length&&this.openLocalFile(y,null,!0)):this.isRemoteFileFormat(y)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(y))).send(mxUtils.bind(this,function(G){200<=G.getStatus()&&
-299>=G.getStatus()&&this.openLocalFile(G.getText(),null,!0)})):/^https?:\/\//.test(y)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(y):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(y)))))}else this.openLocalFile(y,null,!0)}x.stopPropagation();x.preventDefault()}))};EditorUi.prototype.highlightElement=function(d){var f=0,g=0;if(null==d){var x=document.body;var y=document.documentElement;
-var t=(x.clientWidth||y.clientWidth)-3;x=Math.max(x.clientHeight||0,y.clientHeight)-3}else f=d.offsetTop,g=d.offsetLeft,t=d.clientWidth,x=d.clientHeight;y=document.createElement("div");y.style.zIndex=mxPopupMenu.prototype.zIndex+2;y.style.border="3px dotted rgb(254, 137, 12)";y.style.pointerEvents="none";y.style.position="absolute";y.style.top=f+"px";y.style.left=g+"px";y.style.width=Math.max(0,t-3)+"px";y.style.height=Math.max(0,x-3)+"px";null!=d&&d.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(y):
-document.body.appendChild(y);return y};EditorUi.prototype.stringToCells=function(d){d=mxUtils.parseXml(d);var f=this.editor.extractGraphModel(d.documentElement);d=[];if(null!=f){var g=new mxCodec(f.ownerDocument),x=new mxGraphModel;g.decode(f,x);f=x.getChildAt(x.getRoot(),0);for(g=0;g<x.getChildCount(f);g++)d.push(x.getChildAt(f,g))}return d};EditorUi.prototype.openFileHandle=function(d,f,g,x,y){if(null!=f&&0<f.length){!this.useCanvasForExport&&/(\.png)$/i.test(f)?f=f.substring(0,f.length-4)+".drawio":
-/(\.pdf)$/i.test(f)&&(f=f.substring(0,f.length-4)+".drawio");var t=mxUtils.bind(this,function(D){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==D.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,x);try{this.loadLibrary(new LocalLibrary(this,D,f))}catch(I){this.handleError(I,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(D,f,x)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||
-/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(g,mxUtils.bind(this,function(D){this.spinner.stop();t(D)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(D){this.spinner.stop();t(D)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(g,mxUtils.bind(this,function(D){4==D.readyState&&(this.spinner.stop(),
-200<=D.status&&299>=D.status?t(D.responseText):this.handleError({message:mxResources.get(413==D.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(D){this.spinner.stop();this.openLocalFile(D,f,x)}),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,x);try{this.loadLibrary(new LocalLibrary(this,d,g.name))}catch(D){this.handleError(D,mxResources.get("errorLoadingFile"))}}else if(0==d.indexOf("PK"))this.importZipFile(g,mxUtils.bind(this,function(D){this.spinner.stop();t(D)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,f,x)}));else{if("image/png"==g.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==
-g.type){var G=Editor.extractGraphModelFromPdf(d);null!=G&&(y=null,x=!0,d=G)}this.spinner.stop();this.openLocalFile(d,f,x,y,null!=y?g:null)}}};EditorUi.prototype.openFiles=function(d,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var g=0;g<d.length;g++)mxUtils.bind(this,function(x){var y=new FileReader;y.onload=mxUtils.bind(this,function(t){try{this.openFileHandle(t.target.result,x.name,x,f)}catch(G){this.handleError(G)}});y.onerror=mxUtils.bind(this,function(t){this.spinner.stop();
-this.handleError(t);window.openFile=null});"image"!==x.type.substring(0,5)&&"application/pdf"!==x.type||"image/svg"===x.type.substring(0,9)?y.readAsText(x):y.readAsDataURL(x)})(d[g])};EditorUi.prototype.openLocalFile=function(d,f,g,x,y){var t=this.getCurrentFile(),G=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var D=mxUtils.parseXml(d);null!=D&&(this.editor.setGraphXml(D.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,
-d,f||this.defaultFilename,g,x,y))});if(null!=d&&0<d.length)null==t||!t.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=x)?G():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=x)&&null!=t&&t.isModified()?this.confirm(mxResources.get("allChangesLost"),null,G,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(d,f),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=
-t&&t.isModified()?this.confirm(mxResources.get("allChangesLost"),null,G,mxResources.get("cancel"),mxResources.get("discardChanges")):G()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var d={};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,d);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),d);f=[];for(var g in d)f.push(g);return f};EditorUi.prototype.addBasenamesForCell=
-function(d,f){function g(G){if(null!=G){var D=G.lastIndexOf(".");0<D&&(G=G.substring(D+1,G.length));null==f[G]&&(f[G]=!0)}}var x=this.editor.graph,y=x.getCellStyle(d);g(mxStencilRegistry.getBasenameForStencil(y[mxConstants.STYLE_SHAPE]));x.model.isEdge(d)&&(g(mxMarker.getPackageForType(y[mxConstants.STYLE_STARTARROW])),g(mxMarker.getPackageForType(y[mxConstants.STYLE_ENDARROW])));y=x.model.getChildCount(d);for(var t=0;t<y;t++)this.addBasenamesForCell(x.model.getChildAt(d,t),f)};EditorUi.prototype.setGraphEnabled=
-function(d){this.diagramContainer.style.visibility=d?"":"hidden";this.formatContainer.style.visibility=d?"":"hidden";this.sidebarFooterContainer.style.display=d?"":"none";this.sidebarContainer.style.display=d?"":"none";this.hsplit.style.display=d?"":"none";this.editor.graph.setEnabled(d);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=d?"":"hidden",this.ruler.vRuler.container.style.visibility=d?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=d?"":"hidden");
-d||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=
-window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var d=!1;this.installMessageHandler(mxUtils.bind(this,function(f,g,x,y){d||(d=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;this.setFileData(f);if(y)try{var t=this.editor.graph;t.setGridEnabled(!1);t.pageVisible=!1;var G=t.model.cells,D;for(D in G){var I=G[D];null!=
-I&&null!=I.style&&(I.style+=";sketch=1;"+(-1==I.style.indexOf("fontFamily=")||-1<I.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(H){console.log(H)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=x?x:!1;this.updateUi();
-window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(d,f){null!=d?d.getPublicUrl(f):f(null)};EditorUi.prototype.createLoadMessage=function(d){var f=this.editor.graph;return{event:d,
-pageVisible:f.pageVisible,translate:f.view.translate,bounds:f.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:f.view.scale,page:f.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(d){var f=this.editor.graph;f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var g=window.opener||window.parent;if(this.editor.modified){var x=f.background;if(null==x||x==mxConstants.NONE)x=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,
-null,null,null,null,null,null,!1),f,null,!0,mxUtils.bind(this,function(y){g.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=d?!d:!0,data:Editor.createSvgDataUri(y)}),"*")}),null,null,!0,x,1,this.embedExportBorder)}else d||g.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");d||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=
-!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=function(d){var f=null,g=!1,x=!1,y=null,t=mxUtils.bind(this,function(I,H){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(I){if(I.source==
-(window.opener||window.parent)){var H=I.data,S=null,T=mxUtils.bind(this,function(ja){if(null!=ja&&"function"===typeof ja.charAt&&"<"!=ja.charAt(0))try{Editor.isPngDataUrl(ja)?ja=Editor.extractGraphModelFromPng(ja):"data:image/svg+xml;base64,"==ja.substring(0,26)?ja=atob(ja.substring(26)):"data:image/svg+xml;utf8,"==ja.substring(0,24)&&(ja=ja.substring(24)),null!=ja&&("%"==ja.charAt(0)?ja=decodeURIComponent(ja):"<"!=ja.charAt(0)&&(ja=Graph.decompress(ja)))}catch(sa){}return ja});if("json"==urlParams.proto){var M=
-!1;try{H=JSON.parse(H),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[I],"data",[H])}catch(ja){H=null}try{if(null==H)return;if("dialog"==H.action){this.showError(null!=H.titleKey?mxResources.get(H.titleKey):H.title,null!=H.messageKey?mxResources.get(H.messageKey):H.message,null!=H.buttonKey?mxResources.get(H.buttonKey):H.button);null!=H.modified&&(this.editor.modified=H.modified);return}if("layout"==H.action){this.executeLayouts(this.editor.graph.createLayouts(H.layouts));return}if("prompt"==
-H.action){this.spinner.stop();var fa=new FilenameDialog(this,H.defaultValue||"",null!=H.okKey?mxResources.get(H.okKey):H.ok,function(ja){null!=ja?G.postMessage(JSON.stringify({event:"prompt",value:ja,message:H}),"*"):G.postMessage(JSON.stringify({event:"prompt-cancel",message:H}),"*")},null!=H.titleKey?mxResources.get(H.titleKey):H.title);this.showDialog(fa.container,300,80,!0,!1);fa.init();return}if("draft"==H.action){var la=T(H.xml);this.spinner.stop();fa=new DraftDialog(this,mxResources.get("draftFound",
-[H.name||this.defaultFilename]),la,mxUtils.bind(this,function(){this.hideDialog();G.postMessage(JSON.stringify({event:"draft",result:"edit",message:H}),"*")}),mxUtils.bind(this,function(){this.hideDialog();G.postMessage(JSON.stringify({event:"draft",result:"discard",message:H}),"*")}),H.editKey?mxResources.get(H.editKey):null,H.discardKey?mxResources.get(H.discardKey):null,H.ignore?mxUtils.bind(this,function(){this.hideDialog();G.postMessage(JSON.stringify({event:"draft",result:"ignore",message:H}),
-"*")}):null);this.showDialog(fa.container,640,480,!0,!1,mxUtils.bind(this,function(ja){ja&&this.actions.get("exit").funct()}));try{fa.init()}catch(ja){G.postMessage(JSON.stringify({event:"draft",error:ja.toString(),message:H}),"*")}return}if("template"==H.action){this.spinner.stop();var ra=1==H.enableRecent,ba=1==H.enableSearch,oa=1==H.enableCustomTemp;if("1"==urlParams.newTempDlg&&!H.templatesOnly&&null!=H.callback){var na=this.getCurrentUser(),N=new TemplatesDialog(this,function(ja,sa,ya){ja=ja||
-this.emptyDiagramXml;G.postMessage(JSON.stringify({event:"template",xml:ja,blank:ja==this.emptyDiagramXml,name:sa,tempUrl:ya.url,libs:ya.libs,builtIn:null!=ya.info&&null!=ya.info.custContentId,message:H}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=na?na.id:null,ra?mxUtils.bind(this,function(ja,sa,ya){this.remoteInvoke("getRecentDiagrams",[ya],null,ja,sa)}):null,ba?mxUtils.bind(this,function(ja,sa,ya,Aa){this.remoteInvoke("searchDiagrams",[ja,Aa],null,sa,
-ya)}):null,mxUtils.bind(this,function(ja,sa,ya){this.remoteInvoke("getFileContent",[ja.url],null,sa,ya)}),null,oa?mxUtils.bind(this,function(ja){this.remoteInvoke("getCustomTemplates",null,null,ja,function(){ja({},0)})}):null,!1,!1,!0,!0);this.showDialog(N.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}fa=new NewDialog(this,!1,H.templatesOnly?!1:null!=H.callback,mxUtils.bind(this,function(ja,sa,ya,Aa){ja=ja||this.emptyDiagramXml;null!=H.callback?G.postMessage(JSON.stringify({event:"template",
-xml:ja,blank:ja==this.emptyDiagramXml,name:sa,tempUrl:ya,libs:Aa,builtIn:!0,message:H}),"*"):(d(ja,I,ja!=this.emptyDiagramXml,H.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,ra?mxUtils.bind(this,function(ja){this.remoteInvoke("getRecentDiagrams",[null],null,ja,function(){ja(null,"Network Error!")})}):null,ba?mxUtils.bind(this,function(ja,sa){this.remoteInvoke("searchDiagrams",[ja,null],null,sa,function(){sa(null,"Network Error!")})}):null,mxUtils.bind(this,
-function(ja,sa,ya){G.postMessage(JSON.stringify({event:"template",docUrl:ja,info:sa,name:ya}),"*")}),null,null,oa?mxUtils.bind(this,function(ja){this.remoteInvoke("getCustomTemplates",null,null,ja,function(){ja({},0)})}):null,1==H.withoutType);this.showDialog(fa.container,620,460,!0,!1,mxUtils.bind(this,function(ja){this.sidebar.hideTooltip();ja&&this.actions.get("exit").funct()}));fa.init();return}if("textContent"==H.action){var aa=this.getDiagramTextContent();G.postMessage(JSON.stringify({event:"textContent",
-data:aa,message:H}),"*");return}if("status"==H.action){null!=H.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(H.messageKey))):null!=H.message&&this.editor.setStatus(mxUtils.htmlEntities(H.message));null!=H.modified&&(this.editor.modified=H.modified);return}if("spinner"==H.action){var V=null!=H.messageKey?mxResources.get(H.messageKey):H.message;null==H.show||H.show?this.spinner.spin(document.body,V):this.spinner.stop();return}if("exit"==H.action){this.actions.get("exit").funct();
-return}if("viewport"==H.action){null!=H.viewport&&(this.embedViewport=H.viewport);return}if("snapshot"==H.action){this.sendEmbeddedSvgExport(!0);return}if("export"==H.action){if("png"==H.format||"xmlpng"==H.format){if(null==H.spin&&null==H.spinKey||this.spinner.spin(document.body,null!=H.spinKey?mxResources.get(H.spinKey):H.spin)){var ha=null!=H.xml?H.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var X=this.editor.graph,ia=mxUtils.bind(this,function(ja){this.editor.graph.setEnabled(!0);
-this.spinner.stop();var sa=this.createLoadMessage("export");sa.format=H.format;sa.message=H;sa.data=ja;sa.xml=ha;G.postMessage(JSON.stringify(sa),"*")}),q=mxUtils.bind(this,function(ja){null==ja&&(ja=Editor.blankImage);"xmlpng"==H.format&&(ja=Editor.writeGraphModelToPng(ja,"tEXt","mxfile",encodeURIComponent(ha)));X!=this.editor.graph&&X.container.parentNode.removeChild(X.container);ia(ja)}),E=H.pageId||(null!=this.pages?H.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()!=E){var ja=X.getGlobalVariable;X=this.createTemporaryGraph(X.getStylesheet());for(var sa,ya=0;ya<this.pages.length;ya++)if(this.pages[ya].getId()==E){sa=this.updatePageRoot(this.pages[ya]);break}null==sa&&(sa=this.currentPage);X.getGlobalVariable=function(Ia){return"page"==Ia?sa.getName():"pagenumber"==Ia?1:ja.apply(this,arguments)};document.body.appendChild(X.container);X.model.setRoot(sa.root)}if(null!=H.layerIds){var Aa=
-X.model,Ea=Aa.getChildCells(Aa.getRoot()),za={};for(ya=0;ya<H.layerIds.length;ya++)za[H.layerIds[ya]]=!0;for(ya=0;ya<Ea.length;ya++)Aa.setVisible(Ea[ya],za[Ea[ya].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(Ia){q(Ia.toDataURL("image/png"))}),H.width,null,H.background,mxUtils.bind(this,function(){q(null)}),null,null,H.scale,H.transparent,H.shadow,null,X,H.border,null,H.grid,H.keepTheme)});null!=H.xml&&0<H.xml.length&&(g=!0,this.setFileData(ha),g=!1);Q()}else(new mxXmlRequest(EXPORT_URL,
-"format=png&embedXml="+("xmlpng"==H.format?"1":"0")+(null!=E?"&pageId="+E:"")+(null!=H.layerIds&&0<H.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:H.layerIds})):"")+(null!=H.scale?"&scale="+H.scale:"")+"&base64=1&xml="+encodeURIComponent(ha))).send(mxUtils.bind(this,function(ja){200<=ja.getStatus()&&299>=ja.getStatus()?ia("data:image/png;base64,"+ja.getText()):q(null)}),mxUtils.bind(this,function(){q(null)}))}}else if(Q=mxUtils.bind(this,function(){var ja=this.createLoadMessage("export");
-ja.message=H;if("html2"==H.format||"html"==H.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var sa=this.getXmlFileData();ja.xml=mxUtils.getXml(sa);ja.data=this.getFileData(null,null,!0,null,null,null,sa);ja.format=H.format}else if("html"==H.format)sa=this.editor.getGraphXml(),ja.data=this.getHtml(sa,this.editor.graph),ja.xml=mxUtils.getXml(sa),ja.format=H.format;else{mxSvgCanvas2D.prototype.foAltText=null;sa=null!=H.background?H.background:this.editor.graph.background;sa==
-mxConstants.NONE&&(sa=null);ja.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);ja.format="svg";var ya=mxUtils.bind(this,function(Aa){this.editor.graph.setEnabled(!0);this.spinner.stop();ja.data=Editor.createSvgDataUri(Aa);G.postMessage(JSON.stringify(ja),"*")});if("xmlsvg"==H.format)(null==H.spin&&null==H.spinKey||this.spinner.spin(document.body,null!=H.spinKey?mxResources.get(H.spinKey):H.spin))&&this.getEmbeddedSvg(ja.xml,this.editor.graph,null,!0,ya,null,null,H.embedImages,
-sa,H.scale,H.border,H.shadow,H.keepTheme);else if(null==H.spin&&null==H.spinKey||this.spinner.spin(document.body,null!=H.spinKey?mxResources.get(H.spinKey):H.spin))this.editor.graph.setEnabled(!1),sa=this.editor.graph.getSvg(sa,H.scale,H.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||H.shadow,null,H.keepTheme),(this.editor.graph.shadowVisible||H.shadow)&&this.editor.graph.addSvgShadow(sa),this.embedFonts(sa,mxUtils.bind(this,function(Aa){H.embedImages||null==H.embedImages?this.editor.convertImages(Aa,
-mxUtils.bind(this,function(Ea){ya(mxUtils.getXml(Ea))})):ya(mxUtils.getXml(Aa))}));return}G.postMessage(JSON.stringify(ja),"*")}),null!=H.xml&&0<H.xml.length){if(this.editor.graph.mathEnabled){var Y=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){Y.apply(this,arguments);Q()}}g=!0;this.setFileData(H.xml);g=!1;this.editor.graph.mathEnabled||Q()}else Q();return}if("load"==H.action){M=H.toSketch;x=1==H.autosave;this.hideDialog();null!=H.modified&&null==urlParams.modified&&(urlParams.modified=H.modified);
-null!=H.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=H.saveAndExit);null!=H.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=H.noSaveBtn);if(null!=H.rough){var R=Editor.sketchMode;this.doSetSketchMode(H.rough);R!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=H.dark&&(R=Editor.darkMode,this.doSetDarkMode(H.dark),R!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=H.border&&(this.embedExportBorder=H.border);
-null!=H.background&&(this.embedExportBackground=H.background);null!=H.viewport&&(this.embedViewport=H.viewport);this.embedExitPoint=null;if(null!=H.rect){var Z=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=H.rect.top+"px";this.diagramContainer.style.left=H.rect.left+"px";this.diagramContainer.style.height=H.rect.height+"px";this.diagramContainer.style.width=H.rect.width+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right=
-"";S=mxUtils.bind(this,function(){var ja=this.editor.graph,sa=ja.maxFitScale;ja.maxFitScale=H.maxFitScale;ja.fit(2*Z);ja.maxFitScale=sa;ja.container.scrollTop-=2*Z;ja.container.scrollLeft-=2*Z;this.fireEvent(new mxEventObject("editInlineStart","data",[H]))})}null!=H.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=H.noExitBtn);null!=H.title&&null!=this.buttonContainer&&(la=document.createElement("span"),mxUtils.write(la,H.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
-this.buttonContainer.appendChild(la),this.embedFilenameSpan=la);try{H.libs&&this.sidebar.showEntries(H.libs)}catch(ja){}H=null!=H.xmlpng?this.extractGraphModelFromPng(H.xmlpng):null!=H.descriptor?H.descriptor:H.xml}else{if("merge"==H.action){var da=this.getCurrentFile();null!=da&&(la=T(H.xml),null!=la&&""!=la&&da.mergeFile(new LocalFile(this,la),function(){G.postMessage(JSON.stringify({event:"merge",message:H}),"*")},function(ja){G.postMessage(JSON.stringify({event:"merge",message:H,error:ja}),"*")}))}else"remoteInvokeReady"==
-H.action?this.handleRemoteInvokeReady(G):"remoteInvoke"==H.action?this.handleRemoteInvoke(H,I.origin):"remoteInvokeResponse"==H.action?this.handleRemoteInvokeResponse(H):G.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(H)}),"*");return}}catch(ja){this.handleError(ja)}}var qa=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),va=mxUtils.bind(this,function(ja,sa){g=!0;
-try{d(ja,sa,null,M)}catch(ya){this.handleError(ya)}g=!1;null!=urlParams.modified&&this.editor.setStatus("");y=qa();x&&null==f&&(f=mxUtils.bind(this,function(ya,Aa){ya=qa();ya==y||g||(Aa=this.createLoadMessage("autosave"),Aa.xml=ya,(window.opener||window.parent).postMessage(JSON.stringify(Aa),"*"));y=ya}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",f),this.addListener("pageFormatChanged",
-f),this.addListener("pageScaleChanged",f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||"json"==urlParams.proto)sa=this.createLoadMessage("load"),sa.xml=ja,G.postMessage(JSON.stringify(sa),"*");null!=S&&S()});null!=H&&
-"function"===typeof H.substring&&"data:application/vnd.visio;base64,"==H.substring(0,34)?(T="0M8R4KGxGuE"==H.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(H.substring(H.indexOf(",")+1)),function(ja){va(ja,I)},mxUtils.bind(this,function(ja){this.handleError(ja)}),T)):null!=H&&"function"===typeof H.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(H,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(H,
-mxUtils.bind(this,function(ja){4==ja.readyState&&200<=ja.status&&299>=ja.status&&"<mxGraphModel"==ja.responseText.substring(0,13)&&va(ja.responseText,I)}),""):null!=H&&"function"===typeof H.substring&&this.isLucidChartData(H)?this.convertLucidChart(H,mxUtils.bind(this,function(ja){va(ja)}),mxUtils.bind(this,function(ja){this.handleError(ja)})):null==H||"object"!==typeof H||null==H.format||null==H.data&&null==H.url?(H=T(H),va(H,I)):this.loadDescriptor(H,mxUtils.bind(this,function(ja){va(qa(),I)}),
-mxUtils.bind(this,function(ja){this.handleError(ja,mxResources.get("errorLoadingFile"))}))}}));var G=window.opener||window.parent;t="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";G.postMessage(t,"*");if("json"==urlParams.proto){var D=this.editor.graph.openLink;this.editor.graph.openLink=function(I,H,S){D.apply(this,arguments);G.postMessage(JSON.stringify({event:"openLink",href:I,target:H,allowOpener:S}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=
-this.menubar&&"1"!=urlParams.embedInline){var d=document.createElement("div");d.style.display="inline-block";d.style.position="absolute";d.style.paddingTop="2px";d.style.paddingLeft="8px";d.style.paddingBottom="2px";d.style.marginRight="12px";d.style.right="atlas"==uiTheme||"1"==urlParams.atlas||"1"==urlParams["live-ui"]?"52px":"72px";var f=document.createElement("button");f.className="geBigButton";if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var g="1"==urlParams.publishClose?mxResources.get("publish"):
-mxResources.get("saveAndExit");mxUtils.write(f,g);f.setAttribute("title",g);mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));d.appendChild(f)}}else mxUtils.write(f,mxResources.get("save")),f.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),d.appendChild(f),"1"==urlParams.saveAndExit&&(f=document.createElement("a"),mxUtils.write(f,
-mxResources.get("saveAndExit")),f.setAttribute("title",mxResources.get("saveAndExit")),f.className="geBigButton geBigStandardButton",f.style.marginLeft="6px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),d.appendChild(f));"1"!=urlParams.noExitBtn&&(f=document.createElement("a"),g="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(f,g),f.setAttribute("title",g),f.className="geBigButton geBigStandardButton",
-f.style.marginLeft="6px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),d.appendChild(f));this.toolbar.container.appendChild(d);this.toolbar.staticElements.push(d)}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(d){this.importCsv(d)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?
-null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.loadOrgChartLayouts=function(d){var f=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();d()});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?f():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",
-function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",f)})})}):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",f))};EditorUi.prototype.importCsv=function(d,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,f)}))};EditorUi.prototype.doImportCsv=function(d,f){try{var g=d.split("\n"),x=[],y=[],t=[],G={};if(0<g.length){var D={},I=this.editor.graph,H=null,S=null,
-T=null,M=null,fa=null,la=null,ra=null,ba="whiteSpace=wrap;html=1;",oa=null,na=null,N="",aa="auto",V="auto",ha=!1,X=null,ia=null,q=40,E=40,Q=100,Y=0,R=mxUtils.bind(this,function(){null!=f?f(pa):(I.setSelectionCells(pa),I.scrollCellToVisible(I.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),Z=I.getFreeInsertPoint(),da=Z.x,qa=Z.y;Z=qa;var va=null,ja="auto";na=null;for(var sa=[],ya=null,Aa=null,Ea=0;Ea<g.length&&"#"==g[Ea].charAt(0);){d=
-g[Ea].replace(/\r$/,"");for(Ea++;Ea<g.length&&"\\"==d.charAt(d.length-1)&&"#"==g[Ea].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(g[Ea].substring(1)),Ea++;if("#"!=d.charAt(1)){var za=d.indexOf(":");if(0<za){var Ia=mxUtils.trim(d.substring(1,za)),Ca=mxUtils.trim(d.substring(za+1));"label"==Ia?va=I.sanitizeHtml(Ca):"labelname"==Ia&&0<Ca.length&&"-"!=Ca?fa=Ca:"labels"==Ia&&0<Ca.length&&"-"!=Ca?ra=JSON.parse(Ca):"style"==Ia?S=Ca:"parentstyle"==Ia?ba=Ca:"unknownStyle"==Ia&&"-"!=Ca?la=Ca:"stylename"==
-Ia&&0<Ca.length&&"-"!=Ca?M=Ca:"styles"==Ia&&0<Ca.length&&"-"!=Ca?T=JSON.parse(Ca):"vars"==Ia&&0<Ca.length&&"-"!=Ca?H=JSON.parse(Ca):"identity"==Ia&&0<Ca.length&&"-"!=Ca?oa=Ca:"parent"==Ia&&0<Ca.length&&"-"!=Ca?na=Ca:"namespace"==Ia&&0<Ca.length&&"-"!=Ca?N=Ca:"width"==Ia?aa=Ca:"height"==Ia?V=Ca:"collapsed"==Ia&&"-"!=Ca?ha="true"==Ca:"left"==Ia&&0<Ca.length?X=Ca:"top"==Ia&&0<Ca.length?ia=Ca:"ignore"==Ia?Aa=Ca.split(","):"connect"==Ia?sa.push(JSON.parse(Ca)):"link"==Ia?ya=Ca:"padding"==Ia?Y=parseFloat(Ca):
-"edgespacing"==Ia?q=parseFloat(Ca):"nodespacing"==Ia?E=parseFloat(Ca):"levelspacing"==Ia?Q=parseFloat(Ca):"layout"==Ia&&(ja=Ca)}}}if(null==g[Ea])throw Error(mxResources.get("invalidOrMissingFile"));var Sa=this.editor.csvToArray(g[Ea].replace(/\r$/,""));za=d=null;Ia=[];for(Ca=0;Ca<Sa.length;Ca++)oa==Sa[Ca]&&(d=Ca),na==Sa[Ca]&&(za=Ca),Ia.push(mxUtils.trim(Sa[Ca]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==va&&(va="%"+Ia[0]+"%");if(null!=sa)for(var Pa=0;Pa<sa.length;Pa++)null==
-D[sa[Pa].to]&&(D[sa[Pa].to]={});oa=[];for(Ca=Ea+1;Ca<g.length;Ca++){var Ta=this.editor.csvToArray(g[Ca].replace(/\r$/,""));if(null==Ta){var Za=40<g[Ca].length?g[Ca].substring(0,40)+"...":g[Ca];throw Error(Za+" ("+Ca+"):\n"+mxResources.get("containsValidationErrors"));}0<Ta.length&&oa.push(Ta)}I.model.beginUpdate();try{for(Ca=0;Ca<oa.length;Ca++){Ta=oa[Ca];var Na=null,z=null!=d?N+Ta[d]:null;g=!1;null!=z&&(Na=I.model.getCell(z),g=null==Na||0<=mxUtils.indexOf(x,Na));var J=new mxCell(va,new mxGeometry(da,
-Z,0,0),S||"whiteSpace=wrap;html=1;");J.collapsed=ha;J.vertex=!0;J.id=z;null==Na||g||I.model.setCollapsed(Na,ha);for(var O=0;O<Ta.length;O++)I.setAttributeForCell(J,Ia[O],Ta[O]),null==Na||g||I.setAttributeForCell(Na,Ia[O],Ta[O]);if(null!=fa&&null!=ra){var U=ra[J.getAttribute(fa)];null!=U&&(I.labelChanged(J,U),null==Na||g||I.cellLabelChanged(Na,U))}if(null!=M&&null!=T){var W=T[J.getAttribute(M)];null!=W&&(J.style=W)}I.setAttributeForCell(J,"placeholders","1");J.style=I.replacePlaceholders(J,J.style,
-H);null==Na||g?I.fireEvent(new mxEventObject("cellsInserted","cells",[J])):(I.model.setStyle(Na,J.style),0>mxUtils.indexOf(t,Na)&&t.push(Na),I.fireEvent(new mxEventObject("cellsInserted","cells",[Na])));g=null!=Na;Na=J;if(!g)for(Pa=0;Pa<sa.length;Pa++)D[sa[Pa].to][Na.getAttribute(sa[Pa].to)]=Na;null!=ya&&"link"!=ya&&(I.setLinkForCell(Na,Na.getAttribute(ya)),I.setAttributeForCell(Na,ya,null));var ea=this.editor.graph.getPreferredSizeForCell(Na);na=null!=za?I.model.getCell(N+Ta[za]):null;if(Na.vertex){Za=
-null!=na?0:da;Ea=null!=na?0:qa;null!=X&&null!=Na.getAttribute(X)&&(Na.geometry.x=Za+parseFloat(Na.getAttribute(X)));null!=ia&&null!=Na.getAttribute(ia)&&(Na.geometry.y=Ea+parseFloat(Na.getAttribute(ia)));var ka="@"==aa.charAt(0)?Na.getAttribute(aa.substring(1)):null;Na.geometry.width=null!=ka&&"auto"!=ka?parseFloat(Na.getAttribute(aa.substring(1))):"auto"==aa||"auto"==ka?ea.width+Y:parseFloat(aa);var xa="@"==V.charAt(0)?Na.getAttribute(V.substring(1)):null;Na.geometry.height=null!=xa&&"auto"!=xa?
-parseFloat(xa):"auto"==V||"auto"==xa?ea.height+Y:parseFloat(V);Z+=Na.geometry.height+E}g?(null==G[z]&&(G[z]=[]),G[z].push(Na)):(x.push(Na),null!=na?(na.style=I.replacePlaceholders(na,ba,H),I.addCell(Na,na),y.push(na)):t.push(I.addCell(Na)))}for(Ca=0;Ca<y.length;Ca++)ka="@"==aa.charAt(0)?y[Ca].getAttribute(aa.substring(1)):null,xa="@"==V.charAt(0)?y[Ca].getAttribute(V.substring(1)):null,"auto"!=aa&&"auto"!=ka||"auto"!=V&&"auto"!=xa||I.updateGroupBounds([y[Ca]],Y,!0);var ta=t.slice(),pa=t.slice();for(Pa=
-0;Pa<sa.length;Pa++){var ua=sa[Pa];for(Ca=0;Ca<x.length;Ca++){Na=x[Ca];var Da=mxUtils.bind(this,function(fb,pb,lb){var $a=pb.getAttribute(lb.from);if(null!=$a&&""!=$a){$a=$a.split(",");for(var ab=0;ab<$a.length;ab++){var ib=D[lb.to][$a[ab]];if(null==ib&&null!=la){ib=new mxCell($a[ab],new mxGeometry(da,qa,0,0),la);ib.style=I.replacePlaceholders(pb,ib.style,H);var gb=this.editor.graph.getPreferredSizeForCell(ib);ib.geometry.width=gb.width+Y;ib.geometry.height=gb.height+Y;D[lb.to][$a[ab]]=ib;ib.vertex=
-!0;ib.id=$a[ab];t.push(I.addCell(ib))}if(null!=ib){gb=lb.label;null!=lb.fromlabel&&(gb=(pb.getAttribute(lb.fromlabel)||"")+(gb||""));null!=lb.sourcelabel&&(gb=I.replacePlaceholders(pb,lb.sourcelabel,H)+(gb||""));null!=lb.tolabel&&(gb=(gb||"")+(ib.getAttribute(lb.tolabel)||""));null!=lb.targetlabel&&(gb=(gb||"")+I.replacePlaceholders(ib,lb.targetlabel,H));var qb="target"==lb.placeholders==!lb.invert?ib:fb;qb=null!=lb.style?I.replacePlaceholders(qb,lb.style,H):I.createCurrentEdgeStyle();gb=I.insertEdge(null,
-null,gb||"",lb.invert?ib:fb,lb.invert?fb:ib,qb);if(null!=lb.labels)for(qb=0;qb<lb.labels.length;qb++){var nb=lb.labels[qb],mb=new mxCell(nb.label||qb,new mxGeometry(null!=nb.x?nb.x:0,null!=nb.y?nb.y:0,0,0),"resizable=0;html=1;");mb.vertex=!0;mb.connectable=!1;mb.geometry.relative=!0;null!=nb.placeholders&&(mb.value=I.replacePlaceholders("target"==nb.placeholders==!lb.invert?ib:fb,mb.value,H));if(null!=nb.dx||null!=nb.dy)mb.geometry.offset=new mxPoint(null!=nb.dx?nb.dx:0,null!=nb.dy?nb.dy:0);gb.insert(mb)}pa.push(gb);
-mxUtils.remove(lb.invert?fb:ib,ta)}}}});Da(Na,Na,ua);if(null!=G[Na.id])for(O=0;O<G[Na.id].length;O++)Da(Na,G[Na.id][O],ua)}}if(null!=Aa)for(Ca=0;Ca<x.length;Ca++)for(Na=x[Ca],O=0;O<Aa.length;O++)I.setAttributeForCell(Na,mxUtils.trim(Aa[O]),null);if(0<t.length){var Fa=new mxParallelEdgeLayout(I);Fa.spacing=q;Fa.checkOverlap=!0;var Ma=function(){0<Fa.spacing&&Fa.execute(I.getDefaultParent());for(var fb=0;fb<t.length;fb++){var pb=I.getCellGeometry(t[fb]);pb.x=Math.round(I.snap(pb.x));pb.y=Math.round(I.snap(pb.y));
-"auto"==aa&&(pb.width=Math.round(I.snap(pb.width)));"auto"==V&&(pb.height=Math.round(I.snap(pb.height)))}};if("["==ja.charAt(0)){var Qa=R;I.view.validate();this.executeLayouts(I.createLayouts(JSON.parse(ja)),function(){Ma();Qa()});R=null}else if("circle"==ja){var Ba=new mxCircleLayout(I);Ba.disableEdgeStyle=!1;Ba.resetEdges=!1;var Ka=Ba.isVertexIgnored;Ba.isVertexIgnored=function(fb){return Ka.apply(this,arguments)||0>mxUtils.indexOf(t,fb)};this.executeLayout(function(){Ba.execute(I.getDefaultParent());
-Ma()},!0,R);R=null}else if("horizontaltree"==ja||"verticaltree"==ja||"auto"==ja&&pa.length==2*t.length-1&&1==ta.length){I.view.validate();var Oa=new mxCompactTreeLayout(I,"horizontaltree"==ja);Oa.levelDistance=E;Oa.edgeRouting=!1;Oa.resetEdges=!1;this.executeLayout(function(){Oa.execute(I.getDefaultParent(),0<ta.length?ta[0]:null)},!0,R);R=null}else if("horizontalflow"==ja||"verticalflow"==ja||"auto"==ja&&1==ta.length){I.view.validate();var Ya=new mxHierarchicalLayout(I,"horizontalflow"==ja?mxConstants.DIRECTION_WEST:
-mxConstants.DIRECTION_NORTH);Ya.intraCellSpacing=E;Ya.parallelEdgeSpacing=q;Ya.interRankCellSpacing=Q;Ya.disableEdgeStyle=!1;this.executeLayout(function(){Ya.execute(I.getDefaultParent(),pa);I.moveCells(pa,da,qa)},!0,R);R=null}else if("orgchart"==ja){I.view.validate();var db=new mxOrgChartLayout(I,2,Q,E),eb=db.isVertexIgnored;db.isVertexIgnored=function(fb){return eb.apply(this,arguments)||0>mxUtils.indexOf(t,fb)};this.executeLayout(function(){db.execute(I.getDefaultParent());Ma()},!0,R);R=null}else if("organic"==
-ja||"auto"==ja&&pa.length>t.length){I.view.validate();var cb=new mxFastOrganicLayout(I);cb.forceConstant=3*E;cb.disableEdgeStyle=!1;cb.resetEdges=!1;var ub=cb.isVertexIgnored;cb.isVertexIgnored=function(fb){return ub.apply(this,arguments)||0>mxUtils.indexOf(t,fb)};this.executeLayout(function(){cb.execute(I.getDefaultParent());Ma()},!0,R);R=null}}this.hideDialog()}finally{I.model.endUpdate()}null!=R&&R()}}catch(fb){this.handleError(fb)}};EditorUi.prototype.getSearch=function(d){var f="";if("1"!=urlParams.offline&&
-"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var g="?",x;for(x in urlParams)0>mxUtils.indexOf(d,x)&&null!=urlParams[x]&&(f+=g+x+"="+urlParams[x],g="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var f=0<d.indexOf("?")?1:0;if("1"==urlParams.offline)d+=window.location.search;else{var g="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),x;for(x in urlParams)0>mxUtils.indexOf(g,
-x)&&(d=0==f?d+"?":d+"&",null!=urlParams[x]&&(d+=x+"="+urlParams[x],f++))}return d};EditorUi.prototype.showLinkDialog=function(d,f,g,x,y){d=new LinkDialog(this,d,f,g,!0,x,y);this.showDialog(d.container,560,130,!0,!0);d.init()};EditorUi.prototype.getServiceCount=function(d){var f=1;null==this.drive&&"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||f++;null!=this.gitHub&&f++;null!=
-this.gitLab&&f++;d&&isLocalStorage&&"1"==urlParams.browser&&f++;return f};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var d=this.getCurrentFile(),f=null!=d||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(f);this.menus.get("viewZoom").setEnabled(f);var g=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==d||d.isRestricted());this.actions.get("makeCopy").setEnabled(!g);this.actions.get("print").setEnabled(!g);
-this.menus.get("exportAs").setEnabled(!g);this.menus.get("embed").setEnabled(!g);g="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(g);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(g),this.menus.get("newLibrary").setEnabled(g));d="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=d&&d.isEditable();this.actions.get("image").setEnabled(f);this.actions.get("zoomIn").setEnabled(f);this.actions.get("zoomOut").setEnabled(f);this.actions.get("resetView").setEnabled(f);
-this.actions.get("toggleDarkMode").setEnabled("atlas"!=uiTheme);this.actions.get("undo").setEnabled(this.canUndo()&&d);this.actions.get("redo").setEnabled(this.canRedo()&&d);this.menus.get("edit").setEnabled(f);this.menus.get("view").setEnabled(f);this.menus.get("importFrom").setEnabled(d);this.menus.get("arrange").setEnabled(d);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(d),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(d));
-this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var F=EditorUi.prototype.createSidebar;EditorUi.prototype.createSidebar=function(d){var f=F.apply(this,arguments);
-this.addListener("darkModeChanged",mxUtils.bind(this,function(){f.refresh()}));this.addListener("sketchModeChanged",mxUtils.bind(this,function(){f.refresh()}));return f};var L=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){L.apply(this,arguments);var d=this.editor.graph,f=this.getCurrentFile(),g=this.getSelectionState(),x=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(x);this.actions.get("autosave").setEnabled(null!=f&&f.isEditable()&&f.isAutosaveOptional());
-this.actions.get("guides").setEnabled(x);this.actions.get("editData").setEnabled(d.isEnabled());this.actions.get("shadowVisible").setEnabled(x);this.actions.get("connectionArrows").setEnabled(x);this.actions.get("connectionPoints").setEnabled(x);this.actions.get("copyStyle").setEnabled(x&&!d.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(x&&0<g.cells.length);this.actions.get("editGeometry").setEnabled(0<g.vertices.length);this.actions.get("createShape").setEnabled(x);this.actions.get("createRevision").setEnabled(x);
-this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=f&&!f.isRestricted());this.actions.get("editDiagram").setEnabled(x&&(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=f&&!f.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);
-this.actions.get("rename").setEnabled(null!=f&&f.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=f);this.menus.get("publish").setEnabled(null!=f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("hidden"!=this.diagramContainer.style.visibility);f.label=mxResources.get("find")+(d.isEnabled()?"/"+mxResources.get("replace"):"");d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(x&&null!=d&&null!=d.shape&&null!=d.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(d,f,g,x,y,t,G,D){var I=d.editor.graph;if("xml"==g)d.hideDialog(),d.saveData(f,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==g)d.hideDialog(),d.saveData(f,
-"svg",mxUtils.getXml(I.getSvg(x,y,t)),"image/svg+xml");else{var H=d.getFileData(!0,null,null,null,null,!0),S=I.getGraphBounds(),T=Math.floor(S.width*y/I.view.scale),M=Math.floor(S.height*y/I.view.scale);if(H.length<=MAX_REQUEST_SIZE&&T*M<MAX_AREA)if(d.hideDialog(),"png"!=g&&"jpg"!=g&&"jpeg"!=g||!d.isExportToCanvas()){var fa={globalVars:I.getExportVariables()};D&&(fa.grid={size:I.gridSize,steps:I.view.gridSteps,color:I.view.gridColor});d.saveRequest(f,g,function(la,ra){return new mxXmlRequest(EXPORT_URL,
-"format="+g+"&base64="+(ra||"0")+(null!=la?"&filename="+encodeURIComponent(la):"")+"&extras="+encodeURIComponent(JSON.stringify(fa))+(0<G?"&dpi="+G:"")+"&bg="+(null!=x?x:"none")+"&w="+T+"&h="+M+"&border="+t+"&xml="+encodeURIComponent(H))})}else"png"==g?d.exportImage(y,null==x||"none"==x,!0,!1,!1,t,!0,!1,null,D,G):d.exportImage(y,!1,!0,!1,!1,t,!0,!1,"jpeg",D);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);
-var d=this.editor.graph,f="";if(null!=this.pages)for(var g=0;g<this.pages.length;g++){var x=d;this.currentPage!=this.pages[g]&&(x=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[g]),x.model.setRoot(this.pages[g].root));f+=this.pages[g].getName()+" "+x.getIndexableText()+" "}else f=d.getIndexableText();this.editor.graph.setEnabled(!0);return f};EditorUi.prototype.showRemotelyStoredLibrary=function(d){var f={},g=document.createElement("div");g.style.whiteSpace="nowrap";var x=
-document.createElement("h3");mxUtils.write(x,mxUtils.htmlEntities(d));x.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(x);var y=document.createElement("div");y.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";y.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var t={};try{var G=mxSettings.getCustomLibraries();for(d=0;d<G.length;d++){var D=G[d];if("R"==D.substring(0,1)){var I=JSON.parse(decodeURIComponent(D.substring(1)));
-t[I[0]]={id:I[0],title:I[1],downloadUrl:I[2]}}}}catch(H){}this.remoteInvoke("getCustomLibraries",null,null,function(H){y.innerText="";if(0==H.length)y.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var S=0;S<H.length;S++){var T=H[S];t[T.id]&&(f[T.id]=T);var M=this.addCheckbox(y,T.title,t[T.id]);(function(fa,la){mxEvent.addListener(la,"change",function(){this.checked?f[fa.id]=fa:delete f[fa.id]})})(T,M)}},
-mxUtils.bind(this,function(H){y.innerText="";var S=document.createElement("div");S.style.padding="8px";S.style.textAlign="center";mxUtils.write(S,mxResources.get("error")+": ");mxUtils.write(S,null!=H&&null!=H.message?H.message:mxResources.get("unknownError"));y.appendChild(S)}));g.appendChild(y);g=new CustomDialog(this,g,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var H=0,S;for(S in f)null==t[S]&&(H++,mxUtils.bind(this,function(T){this.remoteInvoke("getFileContent",
-[T.downloadUrl],null,mxUtils.bind(this,function(M){H--;0==H&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,M,T))}catch(fa){this.handleError(fa,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){H--;0==H&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[S]));for(S in t)f[S]||this.closeLibrary(new RemoteLibrary(this,null,t[S]));0==H&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");
-this.showDialog(g.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(d){this.remoteWin=
-d;for(var f=0;f<this.remoteInvokeQueue.length;f++)d.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(d){var f=d.msgMarkers,g=this.remoteInvokeCallbacks[f.callbackId];if(null==g)throw Error("No callback for "+(null!=f?f.callbackId:"null"));d.error?g.error&&g.error(d.error.errResp):g.callback&&g.callback.apply(this,d.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,f,g,x,y){var t=
-!0,G=window.setTimeout(mxUtils.bind(this,function(){t=!1;y({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),D=mxUtils.bind(this,function(){window.clearTimeout(G);t&&x.apply(this,arguments)}),I=mxUtils.bind(this,function(){window.clearTimeout(G);t&&y.apply(this,arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:D,error:I});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:f,msgMarkers:g});null!=this.remoteWin?
-this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,f){var g=mxUtils.bind(this,function(H,S){var T={event:"remoteInvokeResponse",msgMarkers:d.msgMarkers};null!=S?T.error={errResp:S}:null!=H&&(T.resp=H);this.remoteWin.postMessage(JSON.stringify(T),"*")});try{var x=d.funtionName,y=this.remoteInvokableFns[x];if(null!=y&&"function"===typeof this[x]){if(y.allowedDomains){for(var t=!1,G=0;G<y.allowedDomains.length;G++)if(f=="https://"+y.allowedDomains[G]){t=
-!0;break}if(!t){g(null,"Invalid Call: "+x+" is not allowed.");return}}var D=d.functionArgs;Array.isArray(D)||(D=[]);if(y.isAsync)D.push(function(){g(Array.prototype.slice.apply(arguments))}),D.push(function(H){g(null,H||"Unkown Error")}),this[x].apply(this,D);else{var I=this[x].apply(this,D);g([I])}}else g(null,"Invalid Call: "+x+" is not found.")}catch(H){g(null,"Invalid Call: An error occurred, "+H.message)}};EditorUi.prototype.openDatabase=function(d,f){if(null==this.database){var g=window.indexedDB||
-window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var x=g.open("database",2);x.onupgradeneeded=function(y){try{var t=x.result;1>y.oldVersion&&t.createObjectStore("objects",{keyPath:"key"});2>y.oldVersion&&(t.createObjectStore("files",{keyPath:"title"}),t.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(G){null!=f&&f(G)}};x.onsuccess=mxUtils.bind(this,function(y){var t=x.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(G){if(!G||"1"==urlParams.forceMigration){var D=document.createElement("iframe");D.style.display="none";D.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(D);var I=!0,H=!1,S,T=0,M=mxUtils.bind(this,function(){H=!0;this.setDatabaseItem(".drawioMigrated3",
-!0);D.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),fa=mxUtils.bind(this,function(){T++;la()}),la=mxUtils.bind(this,function(){try{if(T>=S.length)M();else{var ba=S[T];StorageFile.getFileContent(this,ba,mxUtils.bind(this,function(oa){null==oa||".scratchpad"==ba&&oa==this.emptyLibraryXml?D.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[ba]}),"*"):fa()}),fa)}}catch(oa){console.log(oa)}}),
-ra=mxUtils.bind(this,function(ba){try{this.setDatabaseItem(null,[{title:ba.title,size:ba.data.length,lastModified:Date.now(),type:ba.isLib?"L":"F"},{title:ba.title,data:ba.data}],fa,fa,["filesInfo","files"])}catch(oa){console.log(oa)}});G=mxUtils.bind(this,function(ba){try{if(ba.source==D.contentWindow){var oa={};try{oa=JSON.parse(ba.data)}catch(na){}"init"==oa.event?(D.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),D.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
-funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=oa.event||H||(I?null!=oa.resp&&0<oa.resp.length&&null!=oa.resp[0]?(S=oa.resp[0],I=!1,la()):M():null!=oa.resp&&0<oa.resp.length&&null!=oa.resp[0]?ra(oa.resp[0]):fa())}}catch(na){console.log(na)}});window.addEventListener("message",G)}})));d(t);t.onversionchange=function(){t.close()}});x.onerror=f;x.onblocked=function(){}}catch(y){null!=f&&f(y)}else null!=f&&f()}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d,
-f,g,x,y){this.openDatabase(mxUtils.bind(this,function(t){try{y=y||"objects";Array.isArray(y)||(y=[y],d=[d],f=[f]);var G=t.transaction(y,"readwrite");G.oncomplete=g;G.onerror=x;for(t=0;t<y.length;t++)G.objectStore(y[t]).put(null!=d&&null!=d[t]?{key:d[t],data:f[t]}:f[t])}catch(D){null!=x&&x(D)}}),x)};EditorUi.prototype.removeDatabaseItem=function(d,f,g,x){this.openDatabase(mxUtils.bind(this,function(y){x=x||"objects";Array.isArray(x)||(x=[x],d=[d]);y=y.transaction(x,"readwrite");y.oncomplete=f;y.onerror=
-g;for(var t=0;t<x.length;t++)y.objectStore(x[t]).delete(d[t])}),g)};EditorUi.prototype.getDatabaseItem=function(d,f,g,x){this.openDatabase(mxUtils.bind(this,function(y){try{x=x||"objects";var t=y.transaction([x],"readonly").objectStore(x).get(d);t.onsuccess=function(){f(t.result)};t.onerror=g}catch(G){null!=g&&g(G)}}),g)};EditorUi.prototype.getDatabaseItems=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(x){try{g=g||"objects";var y=x.transaction([g],"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),
-t=[];y.onsuccess=function(G){null==G.target.result?d(t):(t.push(G.target.result.value),G.target.result.continue())};y.onerror=f}catch(G){null!=f&&f(G)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(x){try{g=g||"objects";var y=x.transaction([g],"readonly").objectStore(g).getAllKeys();y.onsuccess=function(){d(y.result)};y.onerror=f}catch(t){null!=f&&f(t)}}),f)};EditorUi.prototype.commentsSupported=function(){var d=this.getCurrentFile();return null!=
-d?d.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(d,f){var g=this.getCurrentFile();null!=g?g.getComments(d,f):d([])};EditorUi.prototype.addComment=function(d,f,g){var x=this.getCurrentFile();null!=x?x.addComment(d,f,g):f(Date.now())};EditorUi.prototype.canReplyToReplies=
-function(){var d=this.getCurrentFile();return null!=d?d.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var d=this.getCurrentFile();return null!=d?d.canComment():!0};EditorUi.prototype.newComment=function(d,f){var g=this.getCurrentFile();return null!=g?g.newComment(d,f):new DrawioComment(this,null,d,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=function(){var d=this.getCurrentFile();return null!=d&&d.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=
-function(d,f){var g=this.getCurrentFile();null!=g&&g.getRevisions?g.getRevisions(d,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var d=this.getCurrentFile();return null!=d&&(d.constructor==DriveFile&&d.isEditable()||d.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(d){d.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=
-function(d,f,g,x,y,t,G,D){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,f,g,x,y,t,G,D)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,
-f)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,f,g,x,y,t,G,D,I,H,S,T,M,fa,la,ra){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,f,g,x,y,t,G,D,I,H,S,T,M,fa,la,ra)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};
-EditorUi.prototype.convertImages=function(d,f,g,x){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(d,f,g,x)};EditorUi.prototype.convertImageToDataUri=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(d,f)};EditorUi.prototype.base64Encode=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(d)};EditorUi.prototype.updateCRC=function(d,f,g,x){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");
-return Editor.updateCRC(d,f,g,x)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(d)};EditorUi.prototype.writeGraphModelToPng=function(d,f,g,x,y){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(d,f,g,x,y)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var d=[],f=0;f<localStorage.length;f++){var g=
-localStorage.key(f),x=localStorage.getItem(g);if(0<g.length&&(".scratchpad"==g||"."!=g.charAt(0))&&0<x.length){var y="<mxfile "===x.substring(0,8)||"<?xml"===x.substring(0,5)||"\x3c!--[if IE]>"===x.substring(0,12);x="<mxlibrary>"===x.substring(0,11);(y||x)&&d.push(g)}}return d};EditorUi.prototype.getLocalStorageFile=function(d){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var f=localStorage.getItem(d);return{title:d,data:f,isLib:"<mxlibrary>"===
-f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,e,k,m,C,p){function F(){for(var ba=H.getElementsByTagName("div"),oa=0,na=0;na<ba.length;na++)"none"!=ba[na].style.display&&ba[na].parentNode==H&&oa++;S.style.display=0==oa?"block":"none"}function L(ba,oa,na,N){function aa(){oa.removeChild(X);oa.removeChild(ia);ha.style.display="block";V.style.display="block"}G={div:oa,comment:ba,saveCallback:na,deleteOnCancel:N};var V=oa.querySelector(".geCommentTxt"),ha=oa.querySelector(".geCommentActionsList"),X=document.createElement("textarea");
-X.className="geCommentEditTxtArea";X.style.minHeight=V.offsetHeight+"px";X.value=ba.content;oa.insertBefore(X,V);var ia=document.createElement("div");ia.className="geCommentEditBtns";var q=mxUtils.button(mxResources.get("cancel"),function(){N?(oa.parentNode.removeChild(oa),F()):aa();G=null});q.className="geCommentEditBtn";ia.appendChild(q);var E=mxUtils.button(mxResources.get("save"),function(){V.innerText="";ba.content=X.value;mxUtils.write(V,ba.content);aa();na(ba);G=null});mxEvent.addListener(X,
-"keydown",mxUtils.bind(this,function(Q){mxEvent.isConsumed(Q)||((mxEvent.isControlDown(Q)||mxClient.IS_MAC&&mxEvent.isMetaDown(Q))&&13==Q.keyCode?(E.click(),mxEvent.consume(Q)):27==Q.keyCode&&(q.click(),mxEvent.consume(Q)))}));E.focus();E.className="geCommentEditBtn gePrimaryBtn";ia.appendChild(E);oa.insertBefore(ia,V);ha.style.display="none";V.style.display="none";X.focus()}function P(ba,oa){oa.innerText="";ba=new Date(ba.modifiedDate);var na=b.timeSince(ba);null==na&&(na=mxResources.get("lessThanAMinute"));
-mxUtils.write(oa,mxResources.get("timeAgo",[na],"{1} ago"));oa.setAttribute("title",ba.toLocaleDateString()+" "+ba.toLocaleTimeString())}function d(ba){var oa=document.createElement("img");oa.className="geCommentBusyImg";oa.src=IMAGE_PATH+"/spin.gif";ba.appendChild(oa);ba.busyImg=oa}function f(ba){ba.style.border="1px solid red";ba.removeChild(ba.busyImg)}function g(ba){ba.style.border="";ba.removeChild(ba.busyImg)}function x(ba,oa,na,N,aa){function V(R,Z,da){var qa=document.createElement("li");qa.className=
-"geCommentAction";var va=document.createElement("a");va.className="geCommentActionLnk";mxUtils.write(va,R);qa.appendChild(va);mxEvent.addListener(va,"click",function(ja){Z(ja,ba);ja.preventDefault();mxEvent.consume(ja)});Y.appendChild(qa);da&&(qa.style.display="none")}function ha(){function R(qa){Z.push(da);if(null!=qa.replies)for(var va=0;va<qa.replies.length;va++)da=da.nextSibling,R(qa.replies[va])}var Z=[],da=ia;R(ba);return{pdiv:da,replies:Z}}function X(R,Z,da,qa,va){function ja(){d(Ea);ba.addReply(Aa,
-function(za){Aa.id=za;ba.replies.push(Aa);g(Ea);da&&da()},function(za){sa();f(Ea);b.handleError(za,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},qa,va)}function sa(){L(Aa,Ea,function(za){ja()},!0)}var ya=ha().pdiv,Aa=b.newComment(R,b.getCurrentUser());Aa.pCommentId=ba.id;null==ba.replies&&(ba.replies=[]);var Ea=x(Aa,ba.replies,ya,N+1);Z?sa():ja()}if(aa||!ba.isResolved){S.style.display="none";var ia=document.createElement("div");ia.className="geCommentContainer";ia.setAttribute("data-commentId",
-ba.id);ia.style.marginLeft=20*N+5+"px";ba.isResolved&&!Editor.isDarkMode()&&(ia.style.backgroundColor="ghostWhite");var q=document.createElement("div");q.className="geCommentHeader";var E=document.createElement("img");E.className="geCommentUserImg";E.src=ba.user.pictureUrl||Editor.userImage;q.appendChild(E);E=document.createElement("div");E.className="geCommentHeaderTxt";q.appendChild(E);var Q=document.createElement("div");Q.className="geCommentUsername";mxUtils.write(Q,ba.user.displayName||"");E.appendChild(Q);
-Q=document.createElement("div");Q.className="geCommentDate";Q.setAttribute("data-commentId",ba.id);P(ba,Q);E.appendChild(Q);ia.appendChild(q);q=document.createElement("div");q.className="geCommentTxt";mxUtils.write(q,ba.content||"");ia.appendChild(q);ba.isLocked&&(ia.style.opacity="0.5");q=document.createElement("div");q.className="geCommentActions";var Y=document.createElement("ul");Y.className="geCommentActionsList";q.appendChild(Y);y||ba.isLocked||0!=N&&!t||V(mxResources.get("reply"),function(){X("",
-!0)},ba.isResolved);E=b.getCurrentUser();null==E||E.id!=ba.user.id||y||ba.isLocked||(V(mxResources.get("edit"),function(){function R(){L(ba,ia,function(){d(ia);ba.editComment(ba.content,function(){g(ia)},function(Z){f(ia);R();b.handleError(Z,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}R()},ba.isResolved),V(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){d(ia);ba.deleteComment(function(R){if(!0===R){R=ia.querySelector(".geCommentTxt");
-R.innerText="";mxUtils.write(R,mxResources.get("msgDeleted"));var Z=ia.querySelectorAll(".geCommentAction");for(R=0;R<Z.length;R++)Z[R].parentNode.removeChild(Z[R]);g(ia);ia.style.opacity="0.5"}else{Z=ha(ba).replies;for(R=0;R<Z.length;R++)H.removeChild(Z[R]);for(R=0;R<oa.length;R++)if(oa[R]==ba){oa.splice(R,1);break}S.style.display=0==H.getElementsByTagName("div").length?"block":"none"}},function(R){f(ia);b.handleError(R,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},
-ba.isResolved));y||ba.isLocked||0!=N||V(ba.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(R){function Z(){var da=R.target;da.innerText="";ba.isResolved=!ba.isResolved;mxUtils.write(da,ba.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var qa=ba.isResolved?"none":"",va=ha(ba).replies,ja=Editor.isDarkMode()?"transparent":ba.isResolved?"ghostWhite":"white",sa=0;sa<va.length;sa++){va[sa].style.backgroundColor=ja;for(var ya=va[sa].querySelectorAll(".geCommentAction"),
-Aa=0;Aa<ya.length;Aa++)ya[Aa]!=da.parentNode&&(ya[Aa].style.display=qa);fa||(va[sa].style.display="none")}F()}ba.isResolved?X(mxResources.get("reOpened")+": ",!0,Z,!1,!0):X(mxResources.get("markedAsResolved"),!1,Z,!0)});ia.appendChild(q);null!=na?H.insertBefore(ia,na.nextSibling):H.appendChild(ia);for(na=0;null!=ba.replies&&na<ba.replies.length;na++)q=ba.replies[na],q.isResolved=ba.isResolved,x(q,ba.replies,null,N+1,aa);null!=G&&(G.comment.id==ba.id?(aa=ba.content,ba.content=G.comment.content,L(ba,
-ia,G.saveCallback,G.deleteOnCancel),ba.content=aa):null==G.comment.id&&G.comment.pCommentId==ba.id&&(H.appendChild(G.div),L(G.comment,G.div,G.saveCallback,G.deleteOnCancel)));return ia}}var y=!b.canComment(),t=b.canReplyToReplies(),G=null,D=document.createElement("div");D.className="geCommentsWin";D.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var I=EditorUi.compactUi?"26px":"30px",H=document.createElement("div");H.className="geCommentsList";H.style.backgroundColor=Editor.isDarkMode()?
-Dialog.backdropColor:"whiteSmoke";H.style.bottom=parseInt(I)+7+"px";D.appendChild(H);var S=document.createElement("span");S.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(S,mxResources.get("noCommentsFound"));var T=document.createElement("div");T.className="geToolbarContainer geCommentsToolbar";T.style.height=I;T.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";T.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";I=document.createElement("a");
-I.className="geButton";if(!y){var M=I.cloneNode();M.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';M.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(M,"click",function(ba){function oa(){L(na,N,function(aa){d(N);b.addComment(aa,function(V){aa.id=V;la.push(aa);g(N)},function(V){f(N);oa();b.handleError(V,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var na=b.newComment("",b.getCurrentUser()),N=x(na,la,null,
-0);oa();ba.preventDefault();mxEvent.consume(ba)});T.appendChild(M)}M=I.cloneNode();M.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';M.setAttribute("title",mxResources.get("showResolved"));M.className="geAdaptiveAsset";var fa=!1;mxEvent.addListener(M,"click",function(ba){this.className=(fa=!fa)?"geButton geCheckedBtn":"geButton";ra();ba.preventDefault();mxEvent.consume(ba)});T.appendChild(M);b.commentsRefreshNeeded()&&(M=I.cloneNode(),M.innerHTML='<img src="'+IMAGE_PATH+
-'/update16.png" style="width: 16px; padding: 2px;">',M.setAttribute("title",mxResources.get("refresh")),M.className="geAdaptiveAsset",mxEvent.addListener(M,"click",function(ba){ra();ba.preventDefault();mxEvent.consume(ba)}),T.appendChild(M));b.commentsSaveNeeded()&&(I=I.cloneNode(),I.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',I.setAttribute("title",mxResources.get("save")),I.className="geAdaptiveAsset",mxEvent.addListener(I,"click",function(ba){p();ba.preventDefault();
-mxEvent.consume(ba)}),T.appendChild(I));D.appendChild(T);var la=[],ra=mxUtils.bind(this,function(){this.hasError=!1;if(null!=G)try{G.div=G.div.cloneNode(!0);var ba=G.div.querySelector(".geCommentEditTxtArea"),oa=G.div.querySelector(".geCommentEditBtns");G.comment.content=ba.value;ba.parentNode.removeChild(ba);oa.parentNode.removeChild(oa)}catch(na){b.handleError(na)}H.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+
-"...</div>";t=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(na){function N(aa){if(null!=aa){aa.sort(function(ha,X){return new Date(ha.modifiedDate)-new Date(X.modifiedDate)});for(var V=0;V<aa.length;V++)N(aa[V].replies)}}na.sort(function(aa,V){return new Date(aa.modifiedDate)-new Date(V.modifiedDate)});H.innerText="";H.appendChild(S);S.style.display="block";la=na;for(na=0;na<la.length;na++)N(la[na].replies),x(la[na],la,null,0,fa);null!=G&&null==G.comment.id&&null==G.comment.pCommentId&&
-(H.appendChild(G.div),L(G.comment,G.div,G.saveCallback,G.deleteOnCancel))},mxUtils.bind(this,function(na){H.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(na&&na.message?": "+na.message:""));this.hasError=!0})):H.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});ra();this.refreshComments=ra;T=mxUtils.bind(this,function(){function ba(V){var ha=na[V.id];if(null!=ha)for(P(V,ha),ha=0;null!=V.replies&&ha<V.replies.length;ha++)ba(V.replies[ha])}if(this.window.isVisible()){for(var oa=
-H.querySelectorAll(".geCommentDate"),na={},N=0;N<oa.length;N++){var aa=oa[N];na[aa.getAttribute("data-commentId")]=aa}for(N=0;N<la.length;N++)ba(la[N])}});setInterval(T,6E4);this.refreshCommentsTime=T;this.window=new mxWindow(mxResources.get("comments"),D,e,k,m,C,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,
-mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,k,m,C,p,F,L,P,d,f){var g=document.createElement("div");g.style.textAlign="center";f=null!=f?f:44;var x=document.createElement("div");x.style.padding="6px";x.style.overflow="auto";x.style.maxHeight=f+"px";x.style.lineHeight="1.2em";mxUtils.write(x,e);g.appendChild(x);null!=d&&(x=document.createElement("div"),x.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",
-d),x.appendChild(e),g.appendChild(x));d=document.createElement("div");d.style.textAlign="center";d.style.whiteSpace="nowrap";var y=document.createElement("input");y.setAttribute("type","checkbox");p=mxUtils.button(p||mxResources.get("cancel"),function(){b.hideDialog();null!=m&&m(y.checked)});p.className="geBtn";null!=L&&(p.innerHTML=L+"<br>"+p.innerHTML,p.style.paddingBottom="8px",p.style.paddingTop="8px",p.style.height="auto",p.style.width="40%");b.editor.cancelFirst&&d.appendChild(p);var t=mxUtils.button(C||
-mxResources.get("ok"),function(){b.hideDialog();null!=k&&k(y.checked)});d.appendChild(t);null!=F?(t.innerHTML=F+"<br>"+t.innerHTML+"<br>",t.style.paddingBottom="8px",t.style.paddingTop="8px",t.style.height="auto",t.className="geBtn",t.style.width="40%"):t.className="geBtn gePrimaryBtn";b.editor.cancelFirst||d.appendChild(p);g.appendChild(d);P?(d.style.marginTop="10px",x=document.createElement("p"),x.style.marginTop="20px",x.style.marginBottom="0px",x.appendChild(y),C=document.createElement("span"),
-mxUtils.write(C," "+mxResources.get("rememberThisSetting")),x.appendChild(C),g.appendChild(x),mxEvent.addListener(C,"click",function(G){y.checked=!y.checked;mxEvent.consume(G)})):d.style.marginTop="12px";this.init=function(){t.focus()};this.container=g};function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
-DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};function RenamePage(b,e,k){this.ui=b;this.page=e;this.previous=this.name=k}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
-function MovePage(b,e,k){this.ui=b;this.oldIndex=e;this.newIndex=k}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
-function SelectPage(b,e,k){this.ui=b;this.previousPage=this.page=e;this.neverShown=!0;null!=e&&(this.neverShown=null==e.viewState,this.ui.updatePageRoot(e),null!=k&&(e.viewState=k,this.neverShown=!1))}
-SelectPage.prototype.execute=function(){var b=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=b){b=this.ui.currentPage;var e=this.ui.editor,k=e.graph,m=Graph.compressNode(e.getGraphXml(!0));mxUtils.setTextContent(b.node,m);b.viewState=k.getViewState();b.root=k.model.root;null!=b.model&&b.model.rootChanged(b.root);k.view.clear(b.root,!0);k.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=b;b=this.ui.currentPage;k.model.prefix=Editor.guid()+"-";k.model.rootChanged(b.root);
-k.setViewState(b.viewState);k.gridEnabled=k.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);e.updateGraphComponents();k.view.validate();k.blockMathRender=!0;k.sizeDidChange();k.blockMathRender=!1;this.neverShown&&(this.neverShown=!1,k.selectUnlockedLayer());e.graph.fireEvent(new mxEventObject(mxEvent.ROOT));e.fireEvent(new mxEventObject("pageSelected","change",this))}};
-function ChangePage(b,e,k,m,C){SelectPage.call(this,b,k);this.relatedPage=e;this.index=m;this.previousIndex=null;this.noSelect=C}mxUtils.extend(ChangePage,SelectPage);
+"white";mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000FF";Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;null!=this.sketchStyleElt?this.sketchStyleElt.innerHTML=Editor.createMinimalCss():null!=Editor.styleElt&&(Editor.styleElt.innerHTML=Editor.createMinimalCss());Editor.isDarkMode()?null==R.parentNode&&document.getElementsByTagName("head")[0].appendChild(R):
+null!=R.parentNode&&R.parentNode.removeChild(R)}};EditorUi.prototype.setPagesVisible=function(e){Editor.pagesVisible!=e&&(Editor.pagesVisible=e,mxSettings.settings.pagesVisible=e,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(e,f){this.sidebar.sidebarTitles!=e&&(this.sidebar.sidebarTitles=e,this.sidebar.refresh(),this.isSettingsEnabled()&&f&&(mxSettings.settings.sidebarTitles=e,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};
+EditorUi.prototype.setInlineFullscreen=function(e){Editor.inlineFullscreen!=e&&(Editor.inlineFullscreen=e,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(e){Editor.sketchMode!=
+e&&(Editor.sketchMode=e,this.updateDefaultStyles())};EditorUi.prototype.updateDefaultStyles=function(){var e=this.editor.graph;e.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);e.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);this.menus.defaultFontSize=Editor.sketchMode?20:"sketch"==Editor.currentTheme?16:Menus.prototype.defaultFontSize;if(this.menus.defaultFontSize==Menus.prototype.defaultFontSize)e.defaultEdgeStyle.fontSize=null,e.defaultVertexStyle.fontSize=
+null;else{e.defaultVertexStyle.fontSize=this.menus.defaultFontSize;var f=parseInt(this.menus.defaultFontSize)-4;e.defaultEdgeStyle.fontSize=f}"sketch"==Editor.currentTheme&&(e.defaultEdgeStyle.edgeStyle="none",e.defaultEdgeStyle.curved="1",e.defaultEdgeStyle.rounded="0",e.defaultEdgeStyle.jettySize="auto",e.defaultEdgeStyle.orthogonalLoop="1",e.defaultEdgeStyle.endArrow="open",e.defaultEdgeStyle.endSize="14",e.defaultEdgeStyle.startSize="14",e.defaultEdgeStyle.sourcePerimeterSpacing="8",e.defaultEdgeStyle.targetPerimeterSpacing=
+"8");Editor.sketchMode?(this.menus.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts),e.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,e.defaultVertexStyle.fontSource=Editor.sketchFontSource,e.defaultVertexStyle.hachureGap="4",e.defaultVertexStyle.sketch="1",e.defaultVertexStyle.jiggle="2",e.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,e.defaultEdgeStyle.fontSource=Editor.sketchFontSource,e.defaultEdgeStyle.sketch="1",e.defaultEdgeStyle.jiggle="2",e.defaultEdgeStyle.hachureGap=
+"4"):this.menus.defaultFonts=Menus.prototype.defaultFonts;e.currentVertexStyle=mxUtils.clone(e.defaultVertexStyle);e.currentEdgeStyle=mxUtils.clone(e.defaultEdgeStyle);this.clearDefaultStyle()};EditorUi.prototype.getLinkTitle=function(e){var f=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(e)){var k=e.indexOf(",");0<k&&(f=this.getPageById(e.substring(k+1)),f=null!=f?f.getName():mxResources.get("pageNotFound"))}else"data:"==e.substring(0,5)&&(f=mxResources.get("action"));return f};
+EditorUi.prototype.handleCustomLink=function(e){if(Graph.isPageLink(e)){var f=e.indexOf(",");if(e=this.getPageById(e.substring(f+1)))this.selectPage(e);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(e)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){Editor.pagesVisible=mxSettings.settings.pagesVisible;
+ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(e){e.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(e){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(e,
+f){"1"!=urlParams["ext-fonts"]?mxSettings.setCustomFonts(this.menus.customFonts):(e=f.getProperty("customFonts"),this.menus.customFonts=e,mxSettings.setCustomFonts(e));mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(e,f){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=
+null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(e,f){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);this.addListener("gridColorChanged",
+mxUtils.bind(this,function(e,f){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(e,f){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),
+this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(e,f,k){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&
+this.editor.exportToCanvas(mxUtils.bind(this,function(z,t){try{this.spinner.stop();var B=this.createImageDataUri(z,f,"png"),I=parseInt(t.getAttribute("width")),O=parseInt(t.getAttribute("height"));this.writeImageToClipboard(B,I,O,mxUtils.bind(this,function(J){this.handleError(J)}))}catch(J){this.handleError(J)}}),null,null,null,mxUtils.bind(this,function(z){this.spinner.stop();this.handleError(z)}),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<e.length?e:null)}catch(z){this.handleError(z)}};EditorUi.prototype.writeImageToClipboard=function(e,f,k,z){var t=this.base64ToBlob(e.substring(e.indexOf(",")+1),"image/png");e=new ClipboardItem({"image/png":t,"text/html":new Blob(['<img src="'+e+'" width="'+f+'" height="'+k+'">'],{type:"text/html"})});navigator.clipboard.write([e])["catch"](z)};EditorUi.prototype.copyCells=function(e,f){var k=this.editor.graph;if(k.isSelectionEmpty())e.innerText="";else{var z=
+mxUtils.sortCells(k.model.getTopmostCells(k.getSelectionCells())),t=mxUtils.getXml(k.encodeCells(z));mxUtils.setTextContent(e,encodeURIComponent(t));f?(k.removeCells(z,!1),k.lastPasteXml=null):(k.lastPasteXml=t,k.pasteCounter=0);e.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var e=null;if(Editor.enableNativeCipboard){var f=this.editor.graph;f.isSelectionEmpty()||(e=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),
+f=mxUtils.getXml(f.encodeCells(e)),navigator.clipboard.writeText(f))}return e};EditorUi.prototype.pasteXml=function(e,f,k,z){var t=this.editor.graph,B=null;t.lastPasteXml==e?t.pasteCounter++:(t.lastPasteXml=e,t.pasteCounter=0);var I=t.pasteCounter*t.gridSize;if(k||this.isCompatibleString(e))B=this.importXml(e,I,I),t.setSelectionCells(B);else if(f&&1==t.getSelectionCount()){I=t.getStartEditingCell(t.getSelectionCell(),z);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(e)&&"image"==t.getCurrentCellStyle(I)[mxConstants.STYLE_SHAPE])t.setCellStyles(mxConstants.STYLE_IMAGE,
+e,[I]);else{t.model.beginUpdate();try{t.labelChanged(I,e),Graph.isLink(e)&&t.setLinkForCell(I,e)}finally{t.model.endUpdate()}}t.setSelectionCell(I)}else B=t.getInsertPoint(),t.isMouseInsertPoint()&&(I=0,t.lastPasteXml==e&&0<t.pasteCounter&&t.pasteCounter--),B=this.insertTextAt(e,B.x+I,B.y+I,!0),t.setSelectionCells(B);t.isSelectionEmpty()||(t.scrollCellToVisible(t.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(t.view.getState(t.getSelectionCell())));return B};EditorUi.prototype.pasteCells=
+function(e,f,k,z){if(!mxEvent.isConsumed(e)){var t=f,B=!1;if(k&&null!=e.clipboardData&&e.clipboardData.getData){var I=e.clipboardData.getData("text/plain"),O=!1;if(null!=I&&0<I.length&&"%3CmxGraphModel%3E"==I.substring(0,18))try{var J=decodeURIComponent(I);this.isCompatibleString(J)&&(O=!0,I=J)}catch(qa){}O=O?null:e.clipboardData.getData("text/html");null!=O&&0<O.length?(t=this.parseHtmlData(O),B="text/plain"!=t.getAttribute("data-type")):null!=I&&0<I.length&&(t=document.createElement("div"),mxUtils.setTextContent(t,
+O))}I=t.getElementsByTagName("span");if(null!=I&&0<I.length&&"application/vnd.lucid.chart.objects"===I[0].getAttribute("data-lucid-type"))k=I[0].getAttribute("data-lucid-content"),null!=k&&0<k.length&&(this.convertLucidChart(k,mxUtils.bind(this,function(qa){var sa=this.editor.graph;sa.lastPasteXml==qa?sa.pasteCounter++:(sa.lastPasteXml=qa,sa.pasteCounter=0);var L=sa.pasteCounter*sa.gridSize;sa.setSelectionCells(this.importXml(qa,L,L));sa.scrollCellToVisible(sa.getSelectionCell())}),mxUtils.bind(this,
+function(qa){this.handleError(qa)})),mxEvent.consume(e));else{var y=B?t.innerHTML:mxUtils.trim(null==t.innerText?mxUtils.getTextContent(t):t.innerText),ia=!1;try{var da=y.lastIndexOf("%3E");0<=da&&da<y.length-3&&(y=y.substring(0,da+3))}catch(qa){}try{I=t.getElementsByTagName("span"),(J=null!=I&&0<I.length?mxUtils.trim(decodeURIComponent(I[0].textContent)):decodeURIComponent(y))&&(this.isCompatibleString(J)||0==J.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(ia=!0,y=J)}catch(qa){}try{if(null!=
+y&&0<y.length){if(0==y.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var ja=mxUtils.bind(this,function(){try{y=(new MiroImporter).importMiroJson(JSON.parse(y)),this.pasteXml(y,z,ia,e)}catch(qa){console.log("Miro import error:",qa)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",ja):ja()}else this.pasteXml(y,z,ia,e);try{mxEvent.consume(e)}catch(qa){}}else if(!k){var aa=this.editor.graph;aa.lastPasteXml=null;aa.pasteCounter=0}}catch(qa){this.handleError(qa)}}}f.innerHTML=
+"&nbsp;"};EditorUi.prototype.addFileDropHandler=function(e){if(Graph.fileSupport)for(var f=null,k=0;k<e.length;k++)mxEvent.addListener(e[k],"dragleave",function(z){null!=f&&(f.parentNode.removeChild(f),f=null);z.stopPropagation();z.preventDefault()}),mxEvent.addListener(e[k],"dragover",mxUtils.bind(this,function(z){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==f&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(f=this.highlightElement());z.stopPropagation();z.preventDefault()})),
+mxEvent.addListener(e[k],"drop",mxUtils.bind(this,function(z){null!=f&&(f.parentNode.removeChild(f),f=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<z.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(z.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(z)&&!mxEvent.isShiftDown(z)):this.openFiles(z.dataTransfer.files,!0);else{var t=this.extractGraphModelFromEvent(z);if(null==t){var B=null!=z.dataTransfer?z.dataTransfer:
+z.clipboardData;null!=B&&(10==document.documentMode||11==document.documentMode?t=B.getData("Text"):(t=null,t=0<=mxUtils.indexOf(B.types,"text/uri-list")?z.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(B.types,"text/html")?B.getData("text/html"):null,null!=t&&0<t.length?(B=document.createElement("div"),B.innerHTML=this.editor.graph.sanitizeHtml(t),B=B.getElementsByTagName("img"),0<B.length&&(t=B[0].getAttribute("src"))):0<=mxUtils.indexOf(B.types,"text/plain")&&(t=B.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(I){200<=I.getStatus()&&299>=I.getStatus()&&this.openLocalFile(I.getText(),null,!0)})):/^https?:\/\//.test(t)&&(null==this.getCurrentFile()?window.location.hash=
+"#U"+encodeURIComponent(t):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(t)))))}else this.openLocalFile(t,null,!0)}z.stopPropagation();z.preventDefault()}))};EditorUi.prototype.highlightElement=function(e){var f=0,k=0;if(null==e){var z=document.body;var t=document.documentElement;var B=(z.clientWidth||t.clientWidth)-3;z=Math.max(z.clientHeight||0,t.clientHeight)-3}else f=e.offsetTop,k=e.offsetLeft,B=e.clientWidth,
+z=e.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=f+"px";t.style.left=k+"px";t.style.width=Math.max(0,B-3)+"px";t.style.height=Math.max(0,z-3)+"px";null!=e&&e.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(t):document.body.appendChild(t);return t};EditorUi.prototype.stringToCells=function(e){e=mxUtils.parseXml(e);
+var f=this.editor.extractGraphModel(e.documentElement);e=[];if(null!=f){var k=new mxCodec(f.ownerDocument),z=new mxGraphModel;k.decode(f,z);f=z.getChildAt(z.getRoot(),0);for(k=0;k<z.getChildCount(f);k++)e.push(z.getChildAt(f,k))}return e};EditorUi.prototype.openFileHandle=function(e,f,k,z,t){if(null!=f&&0<f.length){!this.useCanvasForExport&&/(\.png)$/i.test(f)?f=f.substring(0,f.length-4)+".drawio":/(\.pdf)$/i.test(f)&&(f=f.substring(0,f.length-4)+".drawio");var B=mxUtils.bind(this,function(O){f=0<=
+f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==O.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,z);try{this.loadLibrary(new LocalLibrary(this,O,f))}catch(J){this.handleError(J,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(O,f,z)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(k,mxUtils.bind(this,function(O){this.spinner.stop();
+B(O)}));else if(/(\.*<graphml )/.test(e))this.importGraphML(e,mxUtils.bind(this,function(O){this.spinner.stop();B(O)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(e,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(k,mxUtils.bind(this,function(O){4==O.readyState&&(this.spinner.stop(),200<=O.status&&299>=O.status?B(O.responseText):this.handleError({message:mxResources.get(413==O.status?
+"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(e))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(e,mxUtils.bind(this,function(O){this.spinner.stop();this.openLocalFile(O,f,z)}),mxUtils.bind(this,function(O){this.spinner.stop();this.handleError(O)}));else if("<mxlibrary"==e.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,
+this.defaultFilename,z);try{this.loadLibrary(new LocalLibrary(this,e,k.name))}catch(O){this.handleError(O,mxResources.get("errorLoadingFile"))}}else if(0==e.indexOf("PK"))this.importZipFile(k,mxUtils.bind(this,function(O){this.spinner.stop();B(O)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(e,f,z)}));else{if("image/png"==k.type.substring(0,9))e=this.extractGraphModelFromPng(e);else if("application/pdf"==k.type){var I=Editor.extractGraphModelFromPdf(e);null!=I&&(t=null,z=!0,
+e=I)}this.spinner.stop();this.openLocalFile(e,f,z,t,null!=t?k:null)}}};EditorUi.prototype.openFiles=function(e,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var k=0;k<e.length;k++)mxUtils.bind(this,function(z){var t=new FileReader;t.onload=mxUtils.bind(this,function(B){try{this.openFileHandle(B.target.result,z.name,z,f)}catch(I){this.handleError(I)}});t.onerror=mxUtils.bind(this,function(B){this.spinner.stop();this.handleError(B);window.openFile=null});"image"!==z.type.substring(0,
+5)&&"application/pdf"!==z.type||"image/svg"===z.type.substring(0,9)?t.readAsText(z):t.readAsDataURL(z)})(e[k])};EditorUi.prototype.openLocalFile=function(e,f,k,z,t){var B=this.getCurrentFile(),I=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var O=mxUtils.parseXml(e);null!=O&&(this.editor.setGraphXml(O.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,e,f||this.defaultFilename,k,z,t))});if(null!=
+e&&0<e.length)null==B||!B.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=z)?I():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=z)&&null!=B&&B.isModified()?this.confirm(mxResources.get("allChangesLost"),null,I,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(e,f),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=B&&B.isModified()?this.confirm(mxResources.get("allChangesLost"),
+null,I,mxResources.get("cancel"),mxResources.get("discardChanges")):I()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var e={};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,e);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),e);f=[];for(var k in e)f.push(k);return f};EditorUi.prototype.addBasenamesForCell=function(e,f){function k(I){if(null!=
+I){var O=I.lastIndexOf(".");0<O&&(I=I.substring(O+1,I.length));null==f[I]&&(f[I]=!0)}}var z=this.editor.graph,t=z.getCellStyle(e);k(mxStencilRegistry.getBasenameForStencil(t[mxConstants.STYLE_SHAPE]));z.model.isEdge(e)&&(k(mxMarker.getPackageForType(t[mxConstants.STYLE_STARTARROW])),k(mxMarker.getPackageForType(t[mxConstants.STYLE_ENDARROW])));t=z.model.getChildCount(e);for(var B=0;B<t;B++)this.addBasenamesForCell(z.model.getChildAt(e,B),f)};EditorUi.prototype.setGraphEnabled=function(e){this.diagramContainer.style.visibility=
+e?"":"hidden";this.formatContainer.style.visibility=e?"":"hidden";this.sidebarFooterContainer.style.display=e?"":"none";this.sidebarContainer.style.display=e?"":"none";this.hsplit.style.display=e?"":"none";this.editor.graph.setEnabled(e);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=e?"":"hidden",this.ruler.vRuler.container.style.visibility=e?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=e?"":"hidden");e||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),
+null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var e=
+!1;this.installMessageHandler(mxUtils.bind(this,function(f,k,z,t){e||(e=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;this.setFileData(f);if(t)try{var B=this.editor.graph;B.setGridEnabled(!1);B.pageVisible=!1;var I=B.model.cells,O;for(O in I){var J=I[O];null!=J&&null!=J.style&&(J.style+=";sketch=1;"+(-1==J.style.indexOf("fontFamily=")||-1<J.style.indexOf("fontFamily=Helvetica;")?
+"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(y){console.log(y)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=z?z:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=
+function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(e,f){null!=e?e.getPublicUrl(f):f(null)};EditorUi.prototype.createLoadMessage=function(e){var f=this.editor.graph;return{event:e,pageVisible:f.pageVisible,translate:f.view.translate,bounds:f.getGraphBounds(),currentPage:this.getSelectedPageIndex(),
+scale:f.view.scale,page:f.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(e){var f=this.editor.graph;f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var k=window.opener||window.parent;if(this.editor.modified){var z=f.background;if(null==z||z==mxConstants.NONE)z=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),f,null,!0,mxUtils.bind(this,function(t){k.postMessage(JSON.stringify({event:"export",
+point:this.embedExitPoint,exit:null!=e?!e:!0,data:Editor.createSvgDataUri(t)}),"*")}),null,null,!0,z,1,this.embedExportBorder)}else e||k.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");e||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=
+function(e){var f=null,k=!1,z=!1,t=null,B=mxUtils.bind(this,function(J,y){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,B);mxEvent.addListener(window,"message",mxUtils.bind(this,function(J){if(J.source==(window.opener||window.parent)){var y=J.data,ia=null,da=mxUtils.bind(this,function(pa){if(null!=pa&&"function"===
+typeof pa.charAt&&"<"!=pa.charAt(0))try{Editor.isPngDataUrl(pa)?pa=Editor.extractGraphModelFromPng(pa):"data:image/svg+xml;base64,"==pa.substring(0,26)?pa=atob(pa.substring(26)):"data:image/svg+xml;utf8,"==pa.substring(0,24)&&(pa=pa.substring(24)),null!=pa&&("%"==pa.charAt(0)?pa=decodeURIComponent(pa):"<"!=pa.charAt(0)&&(pa=Graph.decompress(pa)))}catch(Aa){}return pa});if("json"==urlParams.proto){var ja=!1;try{y=JSON.parse(y),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[J],"data",
+[y])}catch(pa){y=null}try{if(null==y)return;if("dialog"==y.action){this.showError(null!=y.titleKey?mxResources.get(y.titleKey):y.title,null!=y.messageKey?mxResources.get(y.messageKey):y.message,null!=y.buttonKey?mxResources.get(y.buttonKey):y.button);null!=y.modified&&(this.editor.modified=y.modified);return}if("layout"==y.action){this.executeLayouts(this.editor.graph.createLayouts(y.layouts));return}if("prompt"==y.action){this.spinner.stop();var aa=new FilenameDialog(this,y.defaultValue||"",null!=
+y.okKey?mxResources.get(y.okKey):y.ok,function(pa){null!=pa?I.postMessage(JSON.stringify({event:"prompt",value:pa,message:y}),"*"):I.postMessage(JSON.stringify({event:"prompt-cancel",message:y}),"*")},null!=y.titleKey?mxResources.get(y.titleKey):y.title);this.showDialog(aa.container,300,80,!0,!1);aa.init();return}if("draft"==y.action){var qa=da(y.xml);this.spinner.stop();aa=new DraftDialog(this,mxResources.get("draftFound",[y.name||this.defaultFilename]),qa,mxUtils.bind(this,function(){this.hideDialog();
+I.postMessage(JSON.stringify({event:"draft",result:"edit",message:y}),"*")}),mxUtils.bind(this,function(){this.hideDialog();I.postMessage(JSON.stringify({event:"draft",result:"discard",message:y}),"*")}),y.editKey?mxResources.get(y.editKey):null,y.discardKey?mxResources.get(y.discardKey):null,y.ignore?mxUtils.bind(this,function(){this.hideDialog();I.postMessage(JSON.stringify({event:"draft",result:"ignore",message:y}),"*")}):null);this.showDialog(aa.container,640,480,!0,!1,mxUtils.bind(this,function(pa){pa&&
+this.actions.get("exit").funct()}));try{aa.init()}catch(pa){I.postMessage(JSON.stringify({event:"draft",error:pa.toString(),message:y}),"*")}return}if("template"==y.action){this.spinner.stop();var sa=1==y.enableRecent,L=1==y.enableSearch,V=1==y.enableCustomTemp;if("1"==urlParams.newTempDlg&&!y.templatesOnly&&null!=y.callback){var T=this.getCurrentUser(),Y=new TemplatesDialog(this,function(pa,Aa,xa){pa=pa||this.emptyDiagramXml;I.postMessage(JSON.stringify({event:"template",xml:pa,blank:pa==this.emptyDiagramXml,
+name:Aa,tempUrl:xa.url,libs:xa.libs,builtIn:null!=xa.info&&null!=xa.info.custContentId,message:y}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=T?T.id:null,sa?mxUtils.bind(this,function(pa,Aa,xa){this.remoteInvoke("getRecentDiagrams",[xa],null,pa,Aa)}):null,L?mxUtils.bind(this,function(pa,Aa,xa,Ma){this.remoteInvoke("searchDiagrams",[pa,Ma],null,Aa,xa)}):null,mxUtils.bind(this,function(pa,Aa,xa){this.remoteInvoke("getFileContent",[pa.url],null,Aa,xa)}),null,
+V?mxUtils.bind(this,function(pa){this.remoteInvoke("getCustomTemplates",null,null,pa,function(){pa({},0)})}):null,!1,!1,!0,!0);this.showDialog(Y.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}aa=new NewDialog(this,!1,y.templatesOnly?!1:null!=y.callback,mxUtils.bind(this,function(pa,Aa,xa,Ma){pa=pa||this.emptyDiagramXml;null!=y.callback?I.postMessage(JSON.stringify({event:"template",xml:pa,blank:pa==this.emptyDiagramXml,name:Aa,tempUrl:xa,libs:Ma,builtIn:!0,message:y}),"*"):
+(e(pa,J,pa!=this.emptyDiagramXml,y.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,sa?mxUtils.bind(this,function(pa){this.remoteInvoke("getRecentDiagrams",[null],null,pa,function(){pa(null,"Network Error!")})}):null,L?mxUtils.bind(this,function(pa,Aa){this.remoteInvoke("searchDiagrams",[pa,null],null,Aa,function(){Aa(null,"Network Error!")})}):null,mxUtils.bind(this,function(pa,Aa,xa){I.postMessage(JSON.stringify({event:"template",docUrl:pa,info:Aa,
+name:xa}),"*")}),null,null,V?mxUtils.bind(this,function(pa){this.remoteInvoke("getCustomTemplates",null,null,pa,function(){pa({},0)})}):null,1==y.withoutType);this.showDialog(aa.container,620,460,!0,!1,mxUtils.bind(this,function(pa){this.sidebar.hideTooltip();pa&&this.actions.get("exit").funct()}));aa.init();return}if("textContent"==y.action){var W=this.getDiagramTextContent();I.postMessage(JSON.stringify({event:"textContent",data:W,message:y}),"*");return}if("status"==y.action){null!=y.messageKey?
+this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(y.messageKey))):null!=y.message&&this.editor.setStatus(mxUtils.htmlEntities(y.message));null!=y.modified&&(this.editor.modified=y.modified);return}if("spinner"==y.action){var ka=null!=y.messageKey?mxResources.get(y.messageKey):y.message;null==y.show||y.show?this.spinner.spin(document.body,ka):this.spinner.stop();return}if("exit"==y.action){this.actions.get("exit").funct();return}if("viewport"==y.action){null!=y.viewport&&(this.embedViewport=
+y.viewport);return}if("snapshot"==y.action){this.sendEmbeddedSvgExport(!0);return}if("export"==y.action){if("png"==y.format||"xmlpng"==y.format){if(null==y.spin&&null==y.spinKey||this.spinner.spin(document.body,null!=y.spinKey?mxResources.get(y.spinKey):y.spin)){var q=null!=y.xml?y.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var F=this.editor.graph,S=mxUtils.bind(this,function(pa){this.editor.graph.setEnabled(!0);this.spinner.stop();var Aa=this.createLoadMessage("export");Aa.format=
+y.format;Aa.message=y;Aa.data=pa;Aa.xml=q;I.postMessage(JSON.stringify(Aa),"*")}),ba=mxUtils.bind(this,function(pa){null==pa&&(pa=Editor.blankImage);"xmlpng"==y.format&&(pa=Editor.writeGraphModelToPng(pa,"tEXt","mxfile",encodeURIComponent(q)));F!=this.editor.graph&&F.container.parentNode.removeChild(F.container);S(pa)}),U=y.pageId||(null!=this.pages?y.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var ca=mxUtils.bind(this,function(){if(null!=this.pages&&
+this.currentPage.getId()!=U){var pa=F.getGlobalVariable;F=this.createTemporaryGraph(F.getStylesheet());for(var Aa,xa=0;xa<this.pages.length;xa++)if(this.pages[xa].getId()==U){Aa=this.updatePageRoot(this.pages[xa]);break}null==Aa&&(Aa=this.currentPage);F.getGlobalVariable=function(La){return"page"==La?Aa.getName():"pagenumber"==La?1:pa.apply(this,arguments)};document.body.appendChild(F.container);F.model.setRoot(Aa.root)}if(null!=y.layerIds){var Ma=F.model,Oa=Ma.getChildCells(Ma.getRoot()),Na={};for(xa=
+0;xa<y.layerIds.length;xa++)Na[y.layerIds[xa]]=!0;for(xa=0;xa<Oa.length;xa++)Ma.setVisible(Oa[xa],Na[Oa[xa].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(La){ba(La.toDataURL("image/png"))}),y.width,null,y.background,mxUtils.bind(this,function(){ba(null)}),null,null,y.scale,y.transparent,y.shadow,null,F,y.border,null,y.grid,y.keepTheme)});null!=y.xml&&0<y.xml.length&&(k=!0,this.setFileData(q),k=!1);ca()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==y.format?"1":
+"0")+(null!=U?"&pageId="+U:"")+(null!=y.layerIds&&0<y.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:y.layerIds})):"")+(null!=y.scale?"&scale="+y.scale:"")+"&base64=1&xml="+encodeURIComponent(q))).send(mxUtils.bind(this,function(pa){200<=pa.getStatus()&&299>=pa.getStatus()?S("data:image/png;base64,"+pa.getText()):ba(null)}),mxUtils.bind(this,function(){ba(null)}))}}else if(ca=mxUtils.bind(this,function(){var pa=this.createLoadMessage("export");pa.message=y;if("html2"==y.format||
+"html"==y.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var Aa=this.getXmlFileData();pa.xml=mxUtils.getXml(Aa);pa.data=this.getFileData(null,null,!0,null,null,null,Aa);pa.format=y.format}else if("html"==y.format)Aa=this.editor.getGraphXml(),pa.data=this.getHtml(Aa,this.editor.graph),pa.xml=mxUtils.getXml(Aa),pa.format=y.format;else{mxSvgCanvas2D.prototype.foAltText=null;Aa=null!=y.background?y.background:this.editor.graph.background;Aa==mxConstants.NONE&&(Aa=null);pa.xml=
+this.getFileData(!0,null,null,null,null,null,null,null,null,!1);pa.format="svg";var xa=mxUtils.bind(this,function(Ma){this.editor.graph.setEnabled(!0);this.spinner.stop();pa.data=Editor.createSvgDataUri(Ma);I.postMessage(JSON.stringify(pa),"*")});if("xmlsvg"==y.format)(null==y.spin&&null==y.spinKey||this.spinner.spin(document.body,null!=y.spinKey?mxResources.get(y.spinKey):y.spin))&&this.getEmbeddedSvg(pa.xml,this.editor.graph,null,!0,xa,null,null,y.embedImages,Aa,y.scale,y.border,y.shadow,y.keepTheme);
+else if(null==y.spin&&null==y.spinKey||this.spinner.spin(document.body,null!=y.spinKey?mxResources.get(y.spinKey):y.spin))this.editor.graph.setEnabled(!1),Aa=this.editor.graph.getSvg(Aa,y.scale,y.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||y.shadow,null,y.keepTheme),(this.editor.graph.shadowVisible||y.shadow)&&this.editor.graph.addSvgShadow(Aa),this.embedFonts(Aa,mxUtils.bind(this,function(Ma){y.embedImages||null==y.embedImages?this.editor.convertImages(Ma,mxUtils.bind(this,
+function(Oa){xa(mxUtils.getXml(Oa))})):xa(mxUtils.getXml(Ma))}));return}I.postMessage(JSON.stringify(pa),"*")}),null!=y.xml&&0<y.xml.length){if(this.editor.graph.mathEnabled){var ea=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){ea.apply(this,arguments);ca()}}k=!0;this.setFileData(y.xml);k=!1;this.editor.graph.mathEnabled||ca()}else ca();return}if("load"==y.action){ja=y.toSketch;z=1==y.autosave;this.hideDialog();null!=y.modified&&null==urlParams.modified&&(urlParams.modified=y.modified);null!=
+y.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=y.saveAndExit);null!=y.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=y.noSaveBtn);if(null!=y.rough){var na=Editor.sketchMode;this.doSetSketchMode(y.rough);na!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=y.dark&&(na=Editor.darkMode,this.doSetDarkMode(y.dark),na!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=y.border&&(this.embedExportBorder=y.border);null!=
+y.background&&(this.embedExportBackground=y.background);null!=y.viewport&&(this.embedViewport=y.viewport);this.embedExitPoint=null;if(null!=y.rect){var ra=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=y.rect.top+"px";this.diagramContainer.style.left=y.rect.left+"px";this.diagramContainer.style.height=y.rect.height+"px";this.diagramContainer.style.width=y.rect.width+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right=
+"";ia=mxUtils.bind(this,function(){var pa=this.editor.graph,Aa=pa.maxFitScale;pa.maxFitScale=y.maxFitScale;pa.fit(2*ra);pa.maxFitScale=Aa;pa.container.scrollTop-=2*ra;pa.container.scrollLeft-=2*ra;this.fireEvent(new mxEventObject("editInlineStart","data",[y]))})}null!=y.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=y.noExitBtn);null!=y.title&&null!=this.buttonContainer&&(qa=document.createElement("span"),mxUtils.write(qa,y.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
+this.buttonContainer.appendChild(qa),this.embedFilenameSpan=qa);try{y.libs&&this.sidebar.showEntries(y.libs)}catch(pa){}y=null!=y.xmlpng?this.extractGraphModelFromPng(y.xmlpng):null!=y.descriptor?y.descriptor:y.xml}else{if("merge"==y.action){var ya=this.getCurrentFile();null!=ya&&(qa=da(y.xml),null!=qa&&""!=qa&&ya.mergeFile(new LocalFile(this,qa),function(){I.postMessage(JSON.stringify({event:"merge",message:y}),"*")},function(pa){I.postMessage(JSON.stringify({event:"merge",message:y,error:pa}),"*")}))}else"remoteInvokeReady"==
+y.action?this.handleRemoteInvokeReady(I):"remoteInvoke"==y.action?this.handleRemoteInvoke(y,J.origin):"remoteInvokeResponse"==y.action?this.handleRemoteInvokeResponse(y):I.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(y)}),"*");return}}catch(pa){this.handleError(pa)}}var va=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(pa,Aa){k=!0;
+try{e(pa,Aa,null,ja)}catch(xa){this.handleError(xa)}k=!1;null!=urlParams.modified&&this.editor.setStatus("");t=va();z&&null==f&&(f=mxUtils.bind(this,function(xa,Ma){xa=va();xa==t||k||(Ma=this.createLoadMessage("autosave"),Ma.xml=xa,(window.opener||window.parent).postMessage(JSON.stringify(Ma),"*"));t=xa}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",f),this.addListener("pageFormatChanged",
+f),this.addListener("pageScaleChanged",f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||"json"==urlParams.proto)Aa=this.createLoadMessage("load"),Aa.xml=pa,I.postMessage(JSON.stringify(Aa),"*");null!=ia&&ia()});null!=
+y&&"function"===typeof y.substring&&"data:application/vnd.visio;base64,"==y.substring(0,34)?(da="0M8R4KGxGuE"==y.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(y.substring(y.indexOf(",")+1)),function(pa){Da(pa,J)},mxUtils.bind(this,function(pa){this.handleError(pa)}),da)):null!=y&&"function"===typeof y.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(y,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(y,
+mxUtils.bind(this,function(pa){4==pa.readyState&&200<=pa.status&&299>=pa.status&&"<mxGraphModel"==pa.responseText.substring(0,13)&&Da(pa.responseText,J)}),""):null!=y&&"function"===typeof y.substring&&this.isLucidChartData(y)?this.convertLucidChart(y,mxUtils.bind(this,function(pa){Da(pa)}),mxUtils.bind(this,function(pa){this.handleError(pa)})):null==y||"object"!==typeof y||null==y.format||null==y.data&&null==y.url?(y=da(y),Da(y,J)):this.loadDescriptor(y,mxUtils.bind(this,function(pa){Da(va(),J)}),
+mxUtils.bind(this,function(pa){this.handleError(pa,mxResources.get("errorLoadingFile"))}))}}));var I=window.opener||window.parent;B="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";I.postMessage(B,"*");if("json"==urlParams.proto){var O=this.editor.graph.openLink;this.editor.graph.openLink=function(J,y,ia){O.apply(this,arguments);I.postMessage(JSON.stringify({event:"openLink",href:J,target:y,allowOpener:ia}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=
+this.menubar&&"1"!=urlParams.embedInline){var e=document.createElement("div");e.style.display="inline-block";e.style.position="absolute";e.style.paddingTop="2px";e.style.paddingLeft="8px";e.style.paddingBottom="2px";e.style.marginRight="12px";e.style.right="atlas"==uiTheme||"1"==urlParams.atlas||"1"==urlParams["live-ui"]?"52px":"72px";var f=document.createElement("button");f.className="geBigButton";if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var k="1"==urlParams.publishClose?mxResources.get("publish"):
+mxResources.get("saveAndExit");mxUtils.write(f,k);f.setAttribute("title",k);mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));e.appendChild(f)}}else mxUtils.write(f,mxResources.get("save")),f.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),e.appendChild(f),"1"==urlParams.saveAndExit&&(f=document.createElement("a"),mxUtils.write(f,
+mxResources.get("saveAndExit")),f.setAttribute("title",mxResources.get("saveAndExit")),f.className="geBigButton geBigStandardButton",f.style.marginLeft="6px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),e.appendChild(f));"1"!=urlParams.noExitBtn&&(f=document.createElement("a"),k="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(f,k),f.setAttribute("title",k),f.className="geBigButton geBigStandardButton",
+f.style.marginLeft="6px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),e.appendChild(f));this.toolbar.container.appendChild(e);this.toolbar.staticElements.push(e)}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(e){this.importCsv(e)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?
+null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.loadOrgChartLayouts=function(e){var f=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();e()});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?f():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",
+function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",f)})})}):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",f))};EditorUi.prototype.importCsv=function(e,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(e,f)}))};EditorUi.prototype.doImportCsv=function(e,f){try{var k=e.split("\n"),z=[],t=[],B=[],I={};if(0<k.length){var O={},J=this.editor.graph,y=null,ia=null,
+da=null,ja=null,aa=null,qa=null,sa=null,L="whiteSpace=wrap;html=1;",V=null,T=null,Y="",W="auto",ka="auto",q=!1,F=null,S=null,ba=40,U=40,ca=100,ea=0,na=mxUtils.bind(this,function(){null!=f?f(Fa):(J.setSelectionCells(Fa),J.scrollCellToVisible(J.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),ra=J.getFreeInsertPoint(),ya=ra.x,va=ra.y;ra=va;var Da=null,pa="auto";T=null;for(var Aa=[],xa=null,Ma=null,Oa=0;Oa<k.length&&"#"==
+k[Oa].charAt(0);){e=k[Oa].replace(/\r$/,"");for(Oa++;Oa<k.length&&"\\"==e.charAt(e.length-1)&&"#"==k[Oa].charAt(0);)e=e.substring(0,e.length-1)+mxUtils.trim(k[Oa].substring(1)),Oa++;if("#"!=e.charAt(1)){var Na=e.indexOf(":");if(0<Na){var La=mxUtils.trim(e.substring(1,Na)),Ba=mxUtils.trim(e.substring(Na+1));"label"==La?Da=J.sanitizeHtml(Ba):"labelname"==La&&0<Ba.length&&"-"!=Ba?aa=Ba:"labels"==La&&0<Ba.length&&"-"!=Ba?sa=JSON.parse(Ba):"style"==La?ia=Ba:"parentstyle"==La?L=Ba:"unknownStyle"==La&&"-"!=
+Ba?qa=Ba:"stylename"==La&&0<Ba.length&&"-"!=Ba?ja=Ba:"styles"==La&&0<Ba.length&&"-"!=Ba?da=JSON.parse(Ba):"vars"==La&&0<Ba.length&&"-"!=Ba?y=JSON.parse(Ba):"identity"==La&&0<Ba.length&&"-"!=Ba?V=Ba:"parent"==La&&0<Ba.length&&"-"!=Ba?T=Ba:"namespace"==La&&0<Ba.length&&"-"!=Ba?Y=Ba:"width"==La?W=Ba:"height"==La?ka=Ba:"collapsed"==La&&"-"!=Ba?q="true"==Ba:"left"==La&&0<Ba.length?F=Ba:"top"==La&&0<Ba.length?S=Ba:"ignore"==La?Ma=Ba.split(","):"connect"==La?Aa.push(JSON.parse(Ba)):"link"==La?xa=Ba:"padding"==
+La?ea=parseFloat(Ba):"edgespacing"==La?ba=parseFloat(Ba):"nodespacing"==La?U=parseFloat(Ba):"levelspacing"==La?ca=parseFloat(Ba):"layout"==La&&(pa=Ba)}}}if(null==k[Oa])throw Error(mxResources.get("invalidOrMissingFile"));var ab=this.editor.csvToArray(k[Oa].replace(/\r$/,""));Na=e=null;La=[];for(Ba=0;Ba<ab.length;Ba++)V==ab[Ba]&&(e=Ba),T==ab[Ba]&&(Na=Ba),La.push(mxUtils.trim(ab[Ba]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Da&&(Da="%"+La[0]+"%");if(null!=Aa)for(var Xa=
+0;Xa<Aa.length;Xa++)null==O[Aa[Xa].to]&&(O[Aa[Xa].to]={});V=[];for(Ba=Oa+1;Ba<k.length;Ba++){var x=this.editor.csvToArray(k[Ba].replace(/\r$/,""));if(null==x){var H=40<k[Ba].length?k[Ba].substring(0,40)+"...":k[Ba];throw Error(H+" ("+Ba+"):\n"+mxResources.get("containsValidationErrors"));}0<x.length&&V.push(x)}J.model.beginUpdate();try{for(Ba=0;Ba<V.length;Ba++){x=V[Ba];var P=null,X=null!=e?Y+x[e]:null;k=!1;null!=X&&(P=J.model.getCell(X),k=null==P||0<=mxUtils.indexOf(z,P));var Z=new mxCell(Da,new mxGeometry(ya,
+ra,0,0),ia||"whiteSpace=wrap;html=1;");Z.collapsed=q;Z.vertex=!0;Z.id=X;null==P||k||J.model.setCollapsed(P,q);for(var fa=0;fa<x.length;fa++)J.setAttributeForCell(Z,La[fa],x[fa]),null==P||k||J.setAttributeForCell(P,La[fa],x[fa]);if(null!=aa&&null!=sa){var la=sa[Z.getAttribute(aa)];null!=la&&(J.labelChanged(Z,la),null==P||k||J.cellLabelChanged(P,la))}if(null!=ja&&null!=da){var za=da[Z.getAttribute(ja)];null!=za&&(Z.style=za)}J.setAttributeForCell(Z,"placeholders","1");Z.style=J.replacePlaceholders(Z,
+Z.style,y);null==P||k?J.fireEvent(new mxEventObject("cellsInserted","cells",[Z])):(J.model.setStyle(P,Z.style),0>mxUtils.indexOf(B,P)&&B.push(P),J.fireEvent(new mxEventObject("cellsInserted","cells",[P])));k=null!=P;P=Z;if(!k)for(Xa=0;Xa<Aa.length;Xa++)O[Aa[Xa].to][P.getAttribute(Aa[Xa].to)]=P;null!=xa&&"link"!=xa&&(J.setLinkForCell(P,P.getAttribute(xa)),J.setAttributeForCell(P,xa,null));var ua=this.editor.graph.getPreferredSizeForCell(P);T=null!=Na?J.model.getCell(Y+x[Na]):null;if(P.vertex){H=null!=
+T?0:ya;Oa=null!=T?0:va;null!=F&&null!=P.getAttribute(F)&&(P.geometry.x=H+parseFloat(P.getAttribute(F)));null!=S&&null!=P.getAttribute(S)&&(P.geometry.y=Oa+parseFloat(P.getAttribute(S)));var oa="@"==W.charAt(0)?P.getAttribute(W.substring(1)):null;P.geometry.width=null!=oa&&"auto"!=oa?parseFloat(P.getAttribute(W.substring(1))):"auto"==W||"auto"==oa?ua.width+ea:parseFloat(W);var ta="@"==ka.charAt(0)?P.getAttribute(ka.substring(1)):null;P.geometry.height=null!=ta&&"auto"!=ta?parseFloat(ta):"auto"==ka||
+"auto"==ta?ua.height+ea:parseFloat(ka);ra+=P.geometry.height+U}k?(null==I[X]&&(I[X]=[]),I[X].push(P)):(z.push(P),null!=T?(T.style=J.replacePlaceholders(T,L,y),J.addCell(P,T),t.push(T)):B.push(J.addCell(P)))}for(Ba=0;Ba<t.length;Ba++)oa="@"==W.charAt(0)?t[Ba].getAttribute(W.substring(1)):null,ta="@"==ka.charAt(0)?t[Ba].getAttribute(ka.substring(1)):null,"auto"!=W&&"auto"!=oa||"auto"!=ka&&"auto"!=ta||J.updateGroupBounds([t[Ba]],ea,!0);var Ea=B.slice(),Fa=B.slice();for(Xa=0;Xa<Aa.length;Xa++){var Pa=
+Aa[Xa];for(Ba=0;Ba<z.length;Ba++){P=z[Ba];var Ra=mxUtils.bind(this,function(Ya,Za,fb){var hb=Za.getAttribute(fb.from);if(null!=hb&&""!=hb){hb=hb.split(",");for(var qb=0;qb<hb.length;qb++){var kb=O[fb.to][hb[qb]];if(null==kb&&null!=qa){kb=new mxCell(hb[qb],new mxGeometry(ya,va,0,0),qa);kb.style=J.replacePlaceholders(Za,kb.style,y);var ib=this.editor.graph.getPreferredSizeForCell(kb);kb.geometry.width=ib.width+ea;kb.geometry.height=ib.height+ea;O[fb.to][hb[qb]]=kb;kb.vertex=!0;kb.id=hb[qb];B.push(J.addCell(kb))}if(null!=
+kb){ib=fb.label;null!=fb.fromlabel&&(ib=(Za.getAttribute(fb.fromlabel)||"")+(ib||""));null!=fb.sourcelabel&&(ib=J.replacePlaceholders(Za,fb.sourcelabel,y)+(ib||""));null!=fb.tolabel&&(ib=(ib||"")+(kb.getAttribute(fb.tolabel)||""));null!=fb.targetlabel&&(ib=(ib||"")+J.replacePlaceholders(kb,fb.targetlabel,y));var ub="target"==fb.placeholders==!fb.invert?kb:Ya;ub=null!=fb.style?J.replacePlaceholders(ub,fb.style,y):J.createCurrentEdgeStyle();ib=J.insertEdge(null,null,ib||"",fb.invert?kb:Ya,fb.invert?
+Ya:kb,ub);if(null!=fb.labels)for(ub=0;ub<fb.labels.length;ub++){var ob=fb.labels[ub],nb=new mxCell(ob.label||ub,new mxGeometry(null!=ob.x?ob.x:0,null!=ob.y?ob.y:0,0,0),"resizable=0;html=1;");nb.vertex=!0;nb.connectable=!1;nb.geometry.relative=!0;null!=ob.placeholders&&(nb.value=J.replacePlaceholders("target"==ob.placeholders==!fb.invert?kb:Ya,nb.value,y));if(null!=ob.dx||null!=ob.dy)nb.geometry.offset=new mxPoint(null!=ob.dx?ob.dx:0,null!=ob.dy?ob.dy:0);ib.insert(nb)}Fa.push(ib);mxUtils.remove(fb.invert?
+Ya:kb,Ea)}}}});Ra(P,P,Pa);if(null!=I[P.id])for(fa=0;fa<I[P.id].length;fa++)Ra(P,I[P.id][fa],Pa)}}if(null!=Ma)for(Ba=0;Ba<z.length;Ba++)for(P=z[Ba],fa=0;fa<Ma.length;fa++)J.setAttributeForCell(P,mxUtils.trim(Ma[fa]),null);if(0<B.length){var Ca=new mxParallelEdgeLayout(J);Ca.spacing=ba;Ca.checkOverlap=!0;var Ja=function(){0<Ca.spacing&&Ca.execute(J.getDefaultParent());for(var Ya=0;Ya<B.length;Ya++){var Za=J.getCellGeometry(B[Ya]);Za.x=Math.round(J.snap(Za.x));Za.y=Math.round(J.snap(Za.y));"auto"==W&&
+(Za.width=Math.round(J.snap(Za.width)));"auto"==ka&&(Za.height=Math.round(J.snap(Za.height)))}};if("["==pa.charAt(0)){var Qa=na;J.view.validate();this.executeLayouts(J.createLayouts(JSON.parse(pa)),function(){Ja();Qa()});na=null}else if("circle"==pa){var $a=new mxCircleLayout(J);$a.disableEdgeStyle=!1;$a.resetEdges=!1;var eb=$a.isVertexIgnored;$a.isVertexIgnored=function(Ya){return eb.apply(this,arguments)||0>mxUtils.indexOf(B,Ya)};this.executeLayout(function(){$a.execute(J.getDefaultParent());Ja()},
+!0,na);na=null}else if("horizontaltree"==pa||"verticaltree"==pa||"auto"==pa&&Fa.length==2*B.length-1&&1==Ea.length){J.view.validate();var cb=new mxCompactTreeLayout(J,"horizontaltree"==pa);cb.levelDistance=U;cb.edgeRouting=!1;cb.resetEdges=!1;this.executeLayout(function(){cb.execute(J.getDefaultParent(),0<Ea.length?Ea[0]:null)},!0,na);na=null}else if("horizontalflow"==pa||"verticalflow"==pa||"auto"==pa&&1==Ea.length){J.view.validate();var db=new mxHierarchicalLayout(J,"horizontalflow"==pa?mxConstants.DIRECTION_WEST:
+mxConstants.DIRECTION_NORTH);db.intraCellSpacing=U;db.parallelEdgeSpacing=ba;db.interRankCellSpacing=ca;db.disableEdgeStyle=!1;this.executeLayout(function(){db.execute(J.getDefaultParent(),Fa);J.moveCells(Fa,ya,va)},!0,na);na=null}else if("orgchart"==pa){J.view.validate();var rb=new mxOrgChartLayout(J,2,ca,U),mb=rb.isVertexIgnored;rb.isVertexIgnored=function(Ya){return mb.apply(this,arguments)||0>mxUtils.indexOf(B,Ya)};this.executeLayout(function(){rb.execute(J.getDefaultParent());Ja()},!0,na);na=
+null}else if("organic"==pa||"auto"==pa&&Fa.length>B.length){J.view.validate();var vb=new mxFastOrganicLayout(J);vb.forceConstant=3*U;vb.disableEdgeStyle=!1;vb.resetEdges=!1;var Bb=vb.isVertexIgnored;vb.isVertexIgnored=function(Ya){return Bb.apply(this,arguments)||0>mxUtils.indexOf(B,Ya)};this.executeLayout(function(){vb.execute(J.getDefaultParent());Ja()},!0,na);na=null}}this.hideDialog()}finally{J.model.endUpdate()}null!=na&&na()}}catch(Ya){this.handleError(Ya)}};EditorUi.prototype.getSearch=function(e){var f=
+"";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=e&&0<window.location.search.length){var k="?",z;for(z in urlParams)0>mxUtils.indexOf(e,z)&&null!=urlParams[z]&&(f+=k+z+"="+urlParams[z],k="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(e){e=null!=e?e:window.location.pathname;var f=0<e.indexOf("?")?1:0;if("1"==urlParams.offline)e+=window.location.search;else{var k="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
+z;for(z in urlParams)0>mxUtils.indexOf(k,z)&&(e=0==f?e+"?":e+"&",null!=urlParams[z]&&(e+=z+"="+urlParams[z],f++))}return e};EditorUi.prototype.showLinkDialog=function(e,f,k,z,t){e=new LinkDialog(this,e,f,k,!0,z,t);this.showDialog(e.container,560,130,!0,!0);e.init()};EditorUi.prototype.getServiceCount=function(e){var f=1;null==this.drive&&"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||
+f++;null!=this.gitHub&&f++;null!=this.gitLab&&f++;e&&isLocalStorage&&"1"==urlParams.browser&&f++;return f};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var e=this.getCurrentFile(),f=null!=e||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(f);this.menus.get("viewZoom").setEnabled(f);var k=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==e||e.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));e="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=e&&e.isEditable();this.actions.get("image").setEnabled(f);this.actions.get("zoomIn").setEnabled(f);this.actions.get("zoomOut").setEnabled(f);
+this.actions.get("resetView").setEnabled(f);this.actions.get("toggleDarkMode").setEnabled("atlas"!=uiTheme);this.actions.get("undo").setEnabled(this.canUndo()&&e);this.actions.get("redo").setEnabled(this.canRedo()&&e);this.menus.get("edit").setEnabled(f);this.menus.get("view").setEnabled(f);this.menus.get("importFrom").setEnabled(e);this.menus.get("arrange").setEnabled(e);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(e),null!=this.toolbar.edgeStyleMenu&&
+this.toolbar.edgeStyleMenu.setEnabled(e));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var e=this.getCurrentFile();return null!=e&&e.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var G=EditorUi.prototype.createSidebar;EditorUi.prototype.createSidebar=
+function(e){var f=G.apply(this,arguments);this.addListener("darkModeChanged",mxUtils.bind(this,function(){f.refresh()}));this.addListener("sketchModeChanged",mxUtils.bind(this,function(){f.refresh()}));return f};var M=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){M.apply(this,arguments);var e=this.editor.graph,f=this.getCurrentFile(),k=this.getSelectionState(),z=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(z);this.actions.get("autosave").setEnabled(null!=
+f&&f.isEditable()&&f.isAutosaveOptional());this.actions.get("guides").setEnabled(z);this.actions.get("editData").setEnabled(e.isEnabled());this.actions.get("shadowVisible").setEnabled(z);this.actions.get("connectionArrows").setEnabled(z);this.actions.get("connectionPoints").setEnabled(z);this.actions.get("copyStyle").setEnabled(z&&!e.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(z&&0<k.cells.length);this.actions.get("editGeometry").setEnabled(0<k.vertices.length);this.actions.get("createShape").setEnabled(z);
+this.actions.get("createRevision").setEnabled(z);this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=f&&!f.isRestricted());this.actions.get("editDiagram").setEnabled(z&&(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=f&&!f.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=
+this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=f&&f.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=f);this.menus.get("publish").setEnabled(null!=f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("hidden"!=this.diagramContainer.style.visibility);f.label=mxResources.get("find")+(e.isEnabled()?"/"+mxResources.get("replace"):"");e=e.view.getState(e.getSelectionCell());this.actions.get("editShape").setEnabled(z&&null!=
+e&&null!=e.shape&&null!=e.shape.stencil)};var Q=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);Q.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(e,f,k,z,t,B,I,O){var J=e.editor.graph;if("xml"==k)e.hideDialog(),e.saveData(f,"xml",mxUtils.getXml(e.editor.getGraphXml()),"text/xml");
+else if("svg"==k)e.hideDialog(),e.saveData(f,"svg",mxUtils.getXml(J.getSvg(z,t,B)),"image/svg+xml");else{var y=e.getFileData(!0,null,null,null,null,!0),ia=J.getGraphBounds(),da=Math.floor(ia.width*t/J.view.scale),ja=Math.floor(ia.height*t/J.view.scale);if(y.length<=MAX_REQUEST_SIZE&&da*ja<MAX_AREA)if(e.hideDialog(),"png"!=k&&"jpg"!=k&&"jpeg"!=k||!e.isExportToCanvas()){var aa={globalVars:J.getExportVariables()};O&&(aa.grid={size:J.gridSize,steps:J.view.gridSteps,color:J.view.gridColor});e.saveRequest(f,
+k,function(qa,sa){return new mxXmlRequest(EXPORT_URL,"format="+k+"&base64="+(sa||"0")+(null!=qa?"&filename="+encodeURIComponent(qa):"")+"&extras="+encodeURIComponent(JSON.stringify(aa))+(0<I?"&dpi="+I:"")+"&bg="+(null!=z?z:"none")+"&w="+da+"&h="+ja+"&border="+B+"&xml="+encodeURIComponent(y))})}else"png"==k?e.exportImage(t,null==z||"none"==z,!0,!1,!1,B,!0,!1,null,O,I):e.exportImage(t,!1,!0,!1,!1,B,!0,!1,"jpeg",O);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=
+function(){this.editor.graph.setEnabled(!1);var e=this.editor.graph,f="";if(null!=this.pages)for(var k=0;k<this.pages.length;k++){var z=e;this.currentPage!=this.pages[k]&&(z=this.createTemporaryGraph(e.getStylesheet()),this.updatePageRoot(this.pages[k]),z.model.setRoot(this.pages[k].root));f+=this.pages[k].getName()+" "+z.getIndexableText()+" "}else f=e.getIndexableText();this.editor.graph.setEnabled(!0);return f};EditorUi.prototype.showRemotelyStoredLibrary=function(e){var f={},k=document.createElement("div");
+k.style.whiteSpace="nowrap";var z=document.createElement("h3");mxUtils.write(z,mxUtils.htmlEntities(e));z.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(z);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 B={};try{var I=mxSettings.getCustomLibraries();for(e=0;e<I.length;e++){var O=I[e];if("R"==
+O.substring(0,1)){var J=JSON.parse(decodeURIComponent(O.substring(1)));B[J[0]]={id:J[0],title:J[1],downloadUrl:J[2]}}}}catch(y){}this.remoteInvoke("getCustomLibraries",null,null,function(y){t.innerText="";if(0==y.length)t.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var ia=0;ia<y.length;ia++){var da=y[ia];B[da.id]&&(f[da.id]=da);var ja=this.addCheckbox(t,da.title,B[da.id]);(function(aa,qa){mxEvent.addListener(qa,
+"change",function(){this.checked?f[aa.id]=aa:delete f[aa.id]})})(da,ja)}},mxUtils.bind(this,function(y){t.innerText="";var ia=document.createElement("div");ia.style.padding="8px";ia.style.textAlign="center";mxUtils.write(ia,mxResources.get("error")+": ");mxUtils.write(ia,null!=y&&null!=y.message?y.message:mxResources.get("unknownError"));t.appendChild(ia)}));k.appendChild(t);k=new CustomDialog(this,k,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var y=0,
+ia;for(ia in f)null==B[ia]&&(y++,mxUtils.bind(this,function(da){this.remoteInvoke("getFileContent",[da.downloadUrl],null,mxUtils.bind(this,function(ja){y--;0==y&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,ja,da))}catch(aa){this.handleError(aa,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){y--;0==y&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[ia]));for(ia in B)f[ia]||this.closeLibrary(new RemoteLibrary(this,null,B[ia]));
+0==y&&this.spinner.stop()}),null,null,"https://www.diagrams.net/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(e){this.remoteWin=e;for(var f=0;f<this.remoteInvokeQueue.length;f++)e.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(e){var f=e.msgMarkers,k=this.remoteInvokeCallbacks[f.callbackId];if(null==k)throw Error("No callback for "+(null!=f?f.callbackId:"null"));e.error?k.error&&k.error(e.error.errResp):k.callback&&k.callback.apply(this,
+e.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(e,f,k,z,t){var B=!0,I=window.setTimeout(mxUtils.bind(this,function(){B=!1;t({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),O=mxUtils.bind(this,function(){window.clearTimeout(I);B&&z.apply(this,arguments)}),J=mxUtils.bind(this,function(){window.clearTimeout(I);B&&t.apply(this,arguments)});k=k||{};k.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:O,
+error:J});e=JSON.stringify({event:"remoteInvoke",funtionName:e,functionArgs:f,msgMarkers:k});null!=this.remoteWin?this.remoteWin.postMessage(e,"*"):this.remoteInvokeQueue.push(e)};EditorUi.prototype.handleRemoteInvoke=function(e,f){var k=mxUtils.bind(this,function(y,ia){var da={event:"remoteInvokeResponse",msgMarkers:e.msgMarkers};null!=ia?da.error={errResp:ia}:null!=y&&(da.resp=y);this.remoteWin.postMessage(JSON.stringify(da),"*")});try{var z=e.funtionName,t=this.remoteInvokableFns[z];if(null!=t&&
+"function"===typeof this[z]){if(t.allowedDomains){for(var B=!1,I=0;I<t.allowedDomains.length;I++)if(f=="https://"+t.allowedDomains[I]){B=!0;break}if(!B){k(null,"Invalid Call: "+z+" is not allowed.");return}}var O=e.functionArgs;Array.isArray(O)||(O=[]);if(t.isAsync)O.push(function(){k(Array.prototype.slice.apply(arguments))}),O.push(function(y){k(null,y||"Unkown Error")}),this[z].apply(this,O);else{var J=this[z].apply(this,O);k([J])}}else k(null,"Invalid Call: "+z+" is not found.")}catch(y){k(null,
+"Invalid Call: An error occurred, "+y.message)}};EditorUi.prototype.openDatabase=function(e,f){if(null==this.database){var k=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=k)try{var z=k.open("database",2);z.onupgradeneeded=function(t){try{var B=z.result;1>t.oldVersion&&B.createObjectStore("objects",{keyPath:"key"});2>t.oldVersion&&(B.createObjectStore("files",{keyPath:"title"}),B.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(I){null!=
+f&&f(I)}};z.onsuccess=mxUtils.bind(this,function(t){var B=z.result;this.database=B;EditorUi.migrateStorageFiles&&(StorageFile.migrate(B),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(I){if(!I||"1"==urlParams.forceMigration){var O=document.createElement("iframe");O.style.display="none";O.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+
+urlParams.forceMigration);document.body.appendChild(O);var J=!0,y=!1,ia,da=0,ja=mxUtils.bind(this,function(){y=!0;this.setDatabaseItem(".drawioMigrated3",!0);O.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),aa=mxUtils.bind(this,function(){da++;qa()}),qa=mxUtils.bind(this,function(){try{if(da>=ia.length)ja();else{var L=ia[da];StorageFile.getFileContent(this,L,mxUtils.bind(this,function(V){null==V||".scratchpad"==L&&V==this.emptyLibraryXml?O.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
+funtionName:"getLocalStorageFile",functionArgs:[L]}),"*"):aa()}),aa)}}catch(V){console.log(V)}}),sa=mxUtils.bind(this,function(L){try{this.setDatabaseItem(null,[{title:L.title,size:L.data.length,lastModified:Date.now(),type:L.isLib?"L":"F"},{title:L.title,data:L.data}],aa,aa,["filesInfo","files"])}catch(V){console.log(V)}});I=mxUtils.bind(this,function(L){try{if(L.source==O.contentWindow){var V={};try{V=JSON.parse(L.data)}catch(T){}"init"==V.event?(O.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),
+"*"),O.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=V.event||y||(J?null!=V.resp&&0<V.resp.length&&null!=V.resp[0]?(ia=V.resp[0],J=!1,qa()):ja():null!=V.resp&&0<V.resp.length&&null!=V.resp[0]?sa(V.resp[0]):aa())}}catch(T){console.log(T)}});window.addEventListener("message",I)}})));e(B);B.onversionchange=function(){B.close()}});z.onerror=f;z.onblocked=function(){}}catch(t){null!=f&&f(t)}else null!=f&&f()}else e(this.database)};
+EditorUi.prototype.setDatabaseItem=function(e,f,k,z,t){this.openDatabase(mxUtils.bind(this,function(B){try{t=t||"objects";Array.isArray(t)||(t=[t],e=[e],f=[f]);var I=B.transaction(t,"readwrite");I.oncomplete=k;I.onerror=z;for(B=0;B<t.length;B++)I.objectStore(t[B]).put(null!=e&&null!=e[B]?{key:e[B],data:f[B]}:f[B])}catch(O){null!=z&&z(O)}}),z)};EditorUi.prototype.removeDatabaseItem=function(e,f,k,z){this.openDatabase(mxUtils.bind(this,function(t){z=z||"objects";Array.isArray(z)||(z=[z],e=[e]);t=t.transaction(z,
+"readwrite");t.oncomplete=f;t.onerror=k;for(var B=0;B<z.length;B++)t.objectStore(z[B]).delete(e[B])}),k)};EditorUi.prototype.getDatabaseItem=function(e,f,k,z){this.openDatabase(mxUtils.bind(this,function(t){try{z=z||"objects";var B=t.transaction([z],"readonly").objectStore(z).get(e);B.onsuccess=function(){f(B.result)};B.onerror=k}catch(I){null!=k&&k(I)}}),k)};EditorUi.prototype.getDatabaseItems=function(e,f,k){this.openDatabase(mxUtils.bind(this,function(z){try{k=k||"objects";var t=z.transaction([k],
+"readonly").objectStore(k).openCursor(IDBKeyRange.lowerBound(0)),B=[];t.onsuccess=function(I){null==I.target.result?e(B):(B.push(I.target.result.value),I.target.result.continue())};t.onerror=f}catch(I){null!=f&&f(I)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(e,f,k){this.openDatabase(mxUtils.bind(this,function(z){try{k=k||"objects";var t=z.transaction([k],"readonly").objectStore(k).getAllKeys();t.onsuccess=function(){e(t.result)};t.onerror=f}catch(B){null!=f&&f(B)}}),f)};EditorUi.prototype.commentsSupported=
+function(){var e=this.getCurrentFile();return null!=e?e.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var e=this.getCurrentFile();return null!=e?e.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var e=this.getCurrentFile();return null!=e?e.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(e,f){var k=this.getCurrentFile();null!=k?k.getComments(e,f):e([])};EditorUi.prototype.addComment=function(e,f,k){var z=this.getCurrentFile();
+null!=z?z.addComment(e,f,k):f(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var e=this.getCurrentFile();return null!=e?e.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var e=this.getCurrentFile();return null!=e?e.canComment():!0};EditorUi.prototype.newComment=function(e,f){var k=this.getCurrentFile();return null!=k?k.newComment(e,f):new DrawioComment(this,null,e,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=function(){var e=this.getCurrentFile();
+return null!=e&&e.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(e,f){var k=this.getCurrentFile();null!=k&&k.getRevisions?k.getRevisions(e,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var e=this.getCurrentFile();return null!=e&&(e.constructor==DriveFile&&e.isEditable()||e.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(e){e.setRequestHeader("Content-Language",
+"da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(e,f,k,z,t,B,I,O){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(e,f,k,z,t,B,I,O)};EditorUi.prototype.loadFonts=function(e){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(e)};EditorUi.prototype.createSvgDataUri=function(e){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(e)};EditorUi.prototype.embedCssFonts=function(e,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");
+return this.editor.embedCssFonts(e,f)};EditorUi.prototype.embedExtFonts=function(e){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(e)};EditorUi.prototype.exportToCanvas=function(e,f,k,z,t,B,I,O,J,y,ia,da,ja,aa,qa,sa){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(e,f,k,z,t,B,I,O,J,y,ia,da,ja,aa,qa,sa)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");
+return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(e,f,k,z){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(e,f,k,z)};EditorUi.prototype.convertImageToDataUri=function(e,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(e,f)};EditorUi.prototype.base64Encode=function(e){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(e)};EditorUi.prototype.updateCRC=
+function(e,f,k,z){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(e,f,k,z)};EditorUi.prototype.crc32=function(e){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(e)};EditorUi.prototype.writeGraphModelToPng=function(e,f,k,z,t){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(e,f,k,z,t)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=
+urlParams.forceMigration)return null;for(var e=[],f=0;f<localStorage.length;f++){var k=localStorage.key(f),z=localStorage.getItem(k);if(0<k.length&&(".scratchpad"==k||"."!=k.charAt(0))&&0<z.length){var t="<mxfile "===z.substring(0,8)||"<?xml"===z.substring(0,5)||"\x3c!--[if IE]>"===z.substring(0,12);z="<mxlibrary>"===z.substring(0,11);(t||z)&&e.push(k)}}return e};EditorUi.prototype.getLocalStorageFile=function(e){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;
+var f=localStorage.getItem(e);return{title:e,data:f,isLib:"<mxlibrary>"===f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
+var CommentsWindow=function(b,d,g,l,D,p){function E(){for(var aa=I.getElementsByTagName("div"),qa=0,sa=0;sa<aa.length;sa++)"none"!=aa[sa].style.display&&aa[sa].parentNode==I&&qa++;O.style.display=0==qa?"block":"none"}function N(aa,qa,sa,L){function V(){qa.removeChild(W);qa.removeChild(ka);Y.style.display="block";T.style.display="block"}z={div:qa,comment:aa,saveCallback:sa,deleteOnCancel:L};var T=qa.querySelector(".geCommentTxt"),Y=qa.querySelector(".geCommentActionsList"),W=document.createElement("textarea");
+W.className="geCommentEditTxtArea";W.style.minHeight=T.offsetHeight+"px";W.value=aa.content;qa.insertBefore(W,T);var ka=document.createElement("div");ka.className="geCommentEditBtns";var q=mxUtils.button(mxResources.get("cancel"),function(){L?(qa.parentNode.removeChild(qa),E()):V();z=null});q.className="geCommentEditBtn";ka.appendChild(q);var F=mxUtils.button(mxResources.get("save"),function(){T.innerText="";aa.content=W.value;mxUtils.write(T,aa.content);V();sa(aa);z=null});mxEvent.addListener(W,
+"keydown",mxUtils.bind(this,function(S){mxEvent.isConsumed(S)||((mxEvent.isControlDown(S)||mxClient.IS_MAC&&mxEvent.isMetaDown(S))&&13==S.keyCode?(F.click(),mxEvent.consume(S)):27==S.keyCode&&(q.click(),mxEvent.consume(S)))}));F.focus();F.className="geCommentEditBtn gePrimaryBtn";ka.appendChild(F);qa.insertBefore(ka,T);Y.style.display="none";T.style.display="none";W.focus()}function R(aa,qa){qa.innerText="";aa=new Date(aa.modifiedDate);var sa=b.timeSince(aa);null==sa&&(sa=mxResources.get("lessThanAMinute"));
+mxUtils.write(qa,mxResources.get("timeAgo",[sa],"{1} ago"));qa.setAttribute("title",aa.toLocaleDateString()+" "+aa.toLocaleTimeString())}function G(aa){var qa=document.createElement("img");qa.className="geCommentBusyImg";qa.src=IMAGE_PATH+"/spin.gif";aa.appendChild(qa);aa.busyImg=qa}function M(aa){aa.style.border="1px solid red";aa.removeChild(aa.busyImg)}function Q(aa){aa.style.border="";aa.removeChild(aa.busyImg)}function e(aa,qa,sa,L,V){function T(U,ca,ea){var na=document.createElement("li");na.className=
+"geCommentAction";var ra=document.createElement("a");ra.className="geCommentActionLnk";mxUtils.write(ra,U);na.appendChild(ra);mxEvent.addListener(ra,"click",function(ya){ca(ya,aa);ya.preventDefault();mxEvent.consume(ya)});ba.appendChild(na);ea&&(na.style.display="none")}function Y(){function U(na){ca.push(ea);if(null!=na.replies)for(var ra=0;ra<na.replies.length;ra++)ea=ea.nextSibling,U(na.replies[ra])}var ca=[],ea=ka;U(aa);return{pdiv:ea,replies:ca}}function W(U,ca,ea,na,ra){function ya(){G(Aa);
+aa.addReply(pa,function(xa){pa.id=xa;aa.replies.push(pa);Q(Aa);ea&&ea()},function(xa){va();M(Aa);b.handleError(xa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},na,ra)}function va(){N(pa,Aa,function(xa){ya()},!0)}var Da=Y().pdiv,pa=b.newComment(U,b.getCurrentUser());pa.pCommentId=aa.id;null==aa.replies&&(aa.replies=[]);var Aa=e(pa,aa.replies,Da,L+1);ca?va():ya()}if(V||!aa.isResolved){O.style.display="none";var ka=document.createElement("div");ka.className="geCommentContainer";
+ka.setAttribute("data-commentId",aa.id);ka.style.marginLeft=20*L+5+"px";aa.isResolved&&!Editor.isDarkMode()&&(ka.style.backgroundColor="ghostWhite");var q=document.createElement("div");q.className="geCommentHeader";var F=document.createElement("img");F.className="geCommentUserImg";F.src=aa.user.pictureUrl||Editor.userImage;q.appendChild(F);F=document.createElement("div");F.className="geCommentHeaderTxt";q.appendChild(F);var S=document.createElement("div");S.className="geCommentUsername";mxUtils.write(S,
+aa.user.displayName||"");F.appendChild(S);S=document.createElement("div");S.className="geCommentDate";S.setAttribute("data-commentId",aa.id);R(aa,S);F.appendChild(S);ka.appendChild(q);q=document.createElement("div");q.className="geCommentTxt";mxUtils.write(q,aa.content||"");ka.appendChild(q);aa.isLocked&&(ka.style.opacity="0.5");q=document.createElement("div");q.className="geCommentActions";var ba=document.createElement("ul");ba.className="geCommentActionsList";q.appendChild(ba);f||aa.isLocked||0!=
+L&&!k||T(mxResources.get("reply"),function(){W("",!0)},aa.isResolved);F=b.getCurrentUser();null==F||F.id!=aa.user.id||f||aa.isLocked||(T(mxResources.get("edit"),function(){function U(){N(aa,ka,function(){G(ka);aa.editComment(aa.content,function(){Q(ka)},function(ca){M(ka);U();b.handleError(ca,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}U()},aa.isResolved),T(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){G(ka);aa.deleteComment(function(U){if(!0===
+U){U=ka.querySelector(".geCommentTxt");U.innerText="";mxUtils.write(U,mxResources.get("msgDeleted"));var ca=ka.querySelectorAll(".geCommentAction");for(U=0;U<ca.length;U++)ca[U].parentNode.removeChild(ca[U]);Q(ka);ka.style.opacity="0.5"}else{ca=Y(aa).replies;for(U=0;U<ca.length;U++)I.removeChild(ca[U]);for(U=0;U<qa.length;U++)if(qa[U]==aa){qa.splice(U,1);break}O.style.display=0==I.getElementsByTagName("div").length?"block":"none"}},function(U){M(ka);b.handleError(U,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},
+aa.isResolved));f||aa.isLocked||0!=L||T(aa.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(U){function ca(){var ea=U.target;ea.innerText="";aa.isResolved=!aa.isResolved;mxUtils.write(ea,aa.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var na=aa.isResolved?"none":"",ra=Y(aa).replies,ya=Editor.isDarkMode()?"transparent":aa.isResolved?"ghostWhite":"white",va=0;va<ra.length;va++){ra[va].style.backgroundColor=ya;for(var Da=ra[va].querySelectorAll(".geCommentAction"),
+pa=0;pa<Da.length;pa++)Da[pa]!=ea.parentNode&&(Da[pa].style.display=na);ia||(ra[va].style.display="none")}E()}aa.isResolved?W(mxResources.get("reOpened")+": ",!0,ca,!1,!0):W(mxResources.get("markedAsResolved"),!1,ca,!0)});ka.appendChild(q);null!=sa?I.insertBefore(ka,sa.nextSibling):I.appendChild(ka);for(sa=0;null!=aa.replies&&sa<aa.replies.length;sa++)q=aa.replies[sa],q.isResolved=aa.isResolved,e(q,aa.replies,null,L+1,V);null!=z&&(z.comment.id==aa.id?(V=aa.content,aa.content=z.comment.content,N(aa,
+ka,z.saveCallback,z.deleteOnCancel),aa.content=V):null==z.comment.id&&z.comment.pCommentId==aa.id&&(I.appendChild(z.div),N(z.comment,z.div,z.saveCallback,z.deleteOnCancel)));return ka}}var f=!b.canComment(),k=b.canReplyToReplies(),z=null,t=document.createElement("div");t.className="geCommentsWin";t.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var B=EditorUi.compactUi?"26px":"30px",I=document.createElement("div");I.className="geCommentsList";I.style.backgroundColor=Editor.isDarkMode()?
+Dialog.backdropColor:"whiteSmoke";I.style.bottom=parseInt(B)+7+"px";t.appendChild(I);var O=document.createElement("span");O.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(O,mxResources.get("noCommentsFound"));var J=document.createElement("div");J.className="geToolbarContainer geCommentsToolbar";J.style.height=B;J.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";J.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";B=document.createElement("a");
+B.className="geButton";if(!f){var y=B.cloneNode();y.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';y.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(y,"click",function(aa){function qa(){N(sa,L,function(V){G(L);b.addComment(V,function(T){V.id=T;da.push(V);Q(L)},function(T){M(L);qa();b.handleError(T,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var sa=b.newComment("",b.getCurrentUser()),L=e(sa,da,null,0);
+qa();aa.preventDefault();mxEvent.consume(aa)});J.appendChild(y)}y=B.cloneNode();y.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';y.setAttribute("title",mxResources.get("showResolved"));y.className="geAdaptiveAsset";var ia=!1;mxEvent.addListener(y,"click",function(aa){this.className=(ia=!ia)?"geButton geCheckedBtn":"geButton";ja();aa.preventDefault();mxEvent.consume(aa)});J.appendChild(y);b.commentsRefreshNeeded()&&(y=B.cloneNode(),y.innerHTML='<img src="'+IMAGE_PATH+
+'/update16.png" style="width: 16px; padding: 2px;">',y.setAttribute("title",mxResources.get("refresh")),y.className="geAdaptiveAsset",mxEvent.addListener(y,"click",function(aa){ja();aa.preventDefault();mxEvent.consume(aa)}),J.appendChild(y));b.commentsSaveNeeded()&&(B=B.cloneNode(),B.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',B.setAttribute("title",mxResources.get("save")),B.className="geAdaptiveAsset",mxEvent.addListener(B,"click",function(aa){p();aa.preventDefault();
+mxEvent.consume(aa)}),J.appendChild(B));t.appendChild(J);var da=[],ja=mxUtils.bind(this,function(){this.hasError=!1;if(null!=z)try{z.div=z.div.cloneNode(!0);var aa=z.div.querySelector(".geCommentEditTxtArea"),qa=z.div.querySelector(".geCommentEditBtns");z.comment.content=aa.value;aa.parentNode.removeChild(aa);qa.parentNode.removeChild(qa)}catch(sa){b.handleError(sa)}I.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(sa){function L(V){if(null!=V){V.sort(function(Y,W){return new Date(Y.modifiedDate)-new Date(W.modifiedDate)});for(var T=0;T<V.length;T++)L(V[T].replies)}}sa.sort(function(V,T){return new Date(V.modifiedDate)-new Date(T.modifiedDate)});I.innerText="";I.appendChild(O);O.style.display="block";da=sa;for(sa=0;sa<da.length;sa++)L(da[sa].replies),e(da[sa],da,null,0,ia);null!=z&&null==z.comment.id&&null==z.comment.pCommentId&&
+(I.appendChild(z.div),N(z.comment,z.div,z.saveCallback,z.deleteOnCancel))},mxUtils.bind(this,function(sa){I.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(sa&&sa.message?": "+sa.message:""));this.hasError=!0})):I.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});ja();this.refreshComments=ja;J=mxUtils.bind(this,function(){function aa(T){var Y=sa[T.id];if(null!=Y)for(R(T,Y),Y=0;null!=T.replies&&Y<T.replies.length;Y++)aa(T.replies[Y])}if(this.window.isVisible()){for(var qa=I.querySelectorAll(".geCommentDate"),
+sa={},L=0;L<qa.length;L++){var V=qa[L];sa[V.getAttribute("data-commentId")]=V}for(L=0;L<da.length;L++)aa(da[L])}});setInterval(J,6E4);this.refreshCommentsTime=J;this.window=new mxWindow(mxResources.get("comments"),t,d,g,l,D,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));
+b.installResizeHandler(this,!0)},ConfirmDialog=function(b,d,g,l,D,p,E,N,R,G,M){var Q=document.createElement("div");Q.style.textAlign="center";M=null!=M?M:44;var e=document.createElement("div");e.style.padding="6px";e.style.overflow="auto";e.style.maxHeight=M+"px";e.style.lineHeight="1.2em";mxUtils.write(e,d);Q.appendChild(e);null!=G&&(e=document.createElement("div"),e.style.padding="6px 0 6px 0",d=document.createElement("img"),d.setAttribute("src",G),e.appendChild(d),Q.appendChild(e));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!=l&&l(f.checked)});p.className="geBtn";null!=N&&(p.innerHTML=N+"<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 k=mxUtils.button(D||mxResources.get("ok"),function(){b.hideDialog();null!=g&&
+g(f.checked)});G.appendChild(k);null!=E?(k.innerHTML=E+"<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||G.appendChild(p);Q.appendChild(G);R?(G.style.marginTop="10px",e=document.createElement("p"),e.style.marginTop="20px",e.style.marginBottom="0px",e.appendChild(f),D=document.createElement("span"),mxUtils.write(D," "+mxResources.get("rememberThisSetting")),
+e.appendChild(D),Q.appendChild(e),mxEvent.addListener(D,"click",function(z){f.checked=!f.checked;mxEvent.consume(z)})):G.style.marginTop="12px";this.init=function(){k.focus()};this.container=Q};function DiagramPage(b,d){this.node=b;null!=d?this.node.setAttribute("id",d):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
+DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};function RenamePage(b,d,g){this.ui=b;this.page=d;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,d,g){this.ui=b;this.oldIndex=d;this.newIndex=g}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
+function SelectPage(b,d,g){this.ui=b;this.previousPage=this.page=d;this.neverShown=!0;null!=d&&(this.neverShown=null==d.viewState,this.ui.updatePageRoot(d),null!=g&&(d.viewState=g,this.neverShown=!1))}
+SelectPage.prototype.execute=function(){var b=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=b){b=this.ui.currentPage;var d=this.ui.editor,g=d.graph,l=Graph.compressNode(d.getGraphXml(!0));mxUtils.setTextContent(b.node,l);b.viewState=g.getViewState();b.root=g.model.root;null!=b.model&&b.model.rootChanged(b.root);g.view.clear(b.root,!0);g.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=b;b=this.ui.currentPage;g.model.prefix=Editor.guid()+"-";g.model.rootChanged(b.root);
+g.setViewState(b.viewState);g.gridEnabled=g.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);d.updateGraphComponents();g.view.validate();g.blockMathRender=!0;g.sizeDidChange();g.blockMathRender=!1;this.neverShown&&(this.neverShown=!1,g.selectUnlockedLayer());d.graph.fireEvent(new mxEventObject(mxEvent.ROOT));d.fireEvent(new mxEventObject("pageSelected","change",this))}};
+function ChangePage(b,d,g,l,D){SelectPage.call(this,b,g);this.relatedPage=d;this.index=l;this.previousIndex=null;this.noSelect=D}mxUtils.extend(ChangePage,SelectPage);
ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var b=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(b,1);this.index=b}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;this.noSelect||SelectPage.prototype.execute.apply(this,arguments)};EditorUi.prototype.tabContainerHeight=38;EditorUi.prototype.getSelectedPageIndex=function(){return this.getPageIndex(this.currentPage)};
-EditorUi.prototype.getPageIndex=function(b){var e=null;if(null!=this.pages&&null!=b)for(var k=0;k<this.pages.length;k++)if(this.pages[k]==b){e=k;break}return e};EditorUi.prototype.getPageById=function(b,e){e=null!=e?e:this.pages;if(null!=e)for(var k=0;k<e.length;k++)if(e[k].getId()==b)return e[k];return null};
-EditorUi.prototype.createImageForPageLink=function(b,e,k){var m=b.indexOf(","),C=null;0<m&&(m=this.getPageById(b.substring(m+1)),null!=m&&m!=e&&(C=this.getImageForPage(m,e,k),C.originalSrc=b));null==C&&(C={originalSrc:b});return C};
-EditorUi.prototype.getImageForPage=function(b,e,k){k=null!=k?k:this.editor.graph;var m=k.getGlobalVariable,C=this.createTemporaryGraph(k.getStylesheet());C.defaultPageBackgroundColor=k.defaultPageBackgroundColor;C.shapeBackgroundColor=k.shapeBackgroundColor;C.shapeForegroundColor=k.shapeForegroundColor;var p=this.getPageIndex(null!=e?e:this.currentPage);C.getGlobalVariable=function(L){return"pagenumber"==L?p+1:"page"==L&&null!=e?e.getName():m.apply(this,arguments)};document.body.appendChild(C.container);
-this.updatePageRoot(b);C.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText="";k=C.getSvg(null,null,null,null,null,null,null,null,null,null,null,!0);var F=C.getGraphBounds();document.body.removeChild(C.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(k)),F.width,F.height,F.x,F.y)};
-EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,e=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var C=
-this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";C!=this.tabContainer.style.height&&this.refresh(!1)}e.apply(b.view,arguments)});var k=null,m=mxUtils.bind(this,function(){this.updateTabContainer();var C=this.currentPage;null!=C&&C!=k&&(null==C.viewState||null==C.viewState.scrollLeft?(this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&
-(b.container.scrollLeft=0,b.container.scrollTop=0,this.chromelessResize())):(b.container.scrollLeft=b.view.translate.x*b.view.scale+C.viewState.scrollLeft,b.container.scrollTop=b.view.translate.y*b.view.scale+C.viewState.scrollTop),k=C);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"===typeof Editor.MathJaxClear||this.editor.graph.mathEnabled&&null!=this.editor||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(C,
-p){C=p.getProperty("edit").changes;for(p=0;p<C.length;p++)if(C[p]instanceof SelectPage||C[p]instanceof RenamePage||C[p]instanceof MovePage||C[p]instanceof mxRootChange){m();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
-EditorUi.prototype.restoreViewState=function(b,e,k){b=null!=b?this.getPageById(b.getId()):null;var 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(k))};
-Graph.prototype.createViewState=function(b){var e=b.getAttribute("page"),k=parseFloat(b.getAttribute("pageScale")),m=parseFloat(b.getAttribute("pageWidth")),C=parseFloat(b.getAttribute("pageHeight")),p=b.getAttribute("background"),F=this.parseBackgroundImage(b.getAttribute("backgroundImage")),L=b.getAttribute("extFonts");if(L)try{L=L.split("|").map(function(P){P=P.split("^");return{name:P[0],url:P[1]}})}catch(P){console.log("ExtFonts format error: "+P.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:F,pageScale:isNaN(k)?mxGraph.prototype.pageScale:k,pageFormat:isNaN(m)||isNaN(C)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
-mxSettings.getPageFormat():new mxRectangle(0,0,m,C),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:L||[]}};
-Graph.prototype.saveViewState=function(b,e,k,m){k||(e.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),e.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),e.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),e.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),e.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),e.setAttribute("connect",null==b||b.connect?"1":"0"),e.setAttribute("arrows",null==b||b.arrows?"1":"0"),e.setAttribute("fold",
-null==b||b.foldingEnabled?"1":"0"));e.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);k=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=k&&(e.setAttribute("pageWidth",k.width),e.setAttribute("pageHeight",k.height));null!=b&&(null!=b.background&&e.setAttribute("background",b.background),m=this.getBackgroundImageObject(b.backgroundImage,m),null!=m&&e.setAttribute("backgroundImage",
-JSON.stringify(m)));e.setAttribute("math",(null==b?this.defaultMathEnabled:b.mathEnabled)?"1":"0");e.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null!=b&&null!=b.extFonts&&0<b.extFonts.length&&e.setAttribute("extFonts",b.extFonts.map(function(C){return C.name+"^"+C.url}).join("|"))};
+EditorUi.prototype.getPageIndex=function(b){var d=null;if(null!=this.pages&&null!=b)for(var g=0;g<this.pages.length;g++)if(this.pages[g]==b){d=g;break}return d};EditorUi.prototype.getPageById=function(b,d){d=null!=d?d:this.pages;if(null!=d)for(var g=0;g<d.length;g++)if(d[g].getId()==b)return d[g];return null};
+EditorUi.prototype.createImageForPageLink=function(b,d,g){var l=b.indexOf(","),D=null;0<l&&(l=this.getPageById(b.substring(l+1)),null!=l&&l!=d&&(D=this.getImageForPage(l,d,g),D.originalSrc=b));null==D&&(D={originalSrc:b});return D};
+EditorUi.prototype.getImageForPage=function(b,d,g){g=null!=g?g:this.editor.graph;var l=g.getGlobalVariable,D=this.createTemporaryGraph(g.getStylesheet());D.defaultPageBackgroundColor=g.defaultPageBackgroundColor;D.shapeBackgroundColor=g.shapeBackgroundColor;D.shapeForegroundColor=g.shapeForegroundColor;var p=this.getPageIndex(null!=d?d:this.currentPage);D.getGlobalVariable=function(N){return"pagenumber"==N?p+1:"page"==N&&null!=d?d.getName():l.apply(this,arguments)};document.body.appendChild(D.container);
+this.updatePageRoot(b);D.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText="";g=D.getSvg(null,null,null,null,null,null,null,null,null,null,null,!0);var E=D.getGraphBounds();document.body.removeChild(D.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(g)),E.width,E.height,E.x,E.y)};
+EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,d=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var D=
+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";D!=this.tabContainer.style.height&&this.refresh(!1)}d.apply(b.view,arguments)});var g=null,l=mxUtils.bind(this,function(){this.updateTabContainer();var D=this.currentPage;null!=D&&D!=g&&(null==D.viewState||null==D.viewState.scrollLeft?(this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&
+(b.container.scrollLeft=0,b.container.scrollTop=0,this.chromelessResize())):(b.container.scrollLeft=b.view.translate.x*b.view.scale+D.viewState.scrollLeft,b.container.scrollTop=b.view.translate.y*b.view.scale+D.viewState.scrollTop),g=D);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"===typeof Editor.MathJaxClear||this.editor.graph.mathEnabled&&null!=this.editor||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(D,
+p){D=p.getProperty("edit").changes;for(p=0;p<D.length;p++)if(D[p]instanceof SelectPage||D[p]instanceof RenamePage||D[p]instanceof MovePage||D[p]instanceof mxRootChange){l();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
+EditorUi.prototype.restoreViewState=function(b,d,g){b=null!=b?this.getPageById(b.getId()):null;var l=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,d):(l.setViewState(d),this.editor.updateGraphComponents(),l.view.revalidate(),l.sizeDidChange()),l.container.scrollLeft=l.view.translate.x*l.view.scale+d.scrollLeft,l.container.scrollTop=l.view.translate.y*l.view.scale+d.scrollTop,l.restoreSelection(g))};
+Graph.prototype.createViewState=function(b){var d=b.getAttribute("page"),g=parseFloat(b.getAttribute("pageScale")),l=parseFloat(b.getAttribute("pageWidth")),D=parseFloat(b.getAttribute("pageHeight")),p=b.getAttribute("background"),E=this.parseBackgroundImage(b.getAttribute("backgroundImage")),N=b.getAttribute("extFonts");if(N)try{N=N.split("|").map(function(R){R=R.split("^");return{name:R[0],url:R[1]}})}catch(R){console.log("ExtFonts format error: "+R.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
+gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=d?"0"!=d:this.defaultPageVisible,background:null!=p&&0<p.length?p:null,backgroundImage:E,pageScale:isNaN(g)?mxGraph.prototype.pageScale:g,pageFormat:isNaN(l)||isNaN(D)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
+mxSettings.getPageFormat():new mxRectangle(0,0,l,D),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:N||[]}};
+Graph.prototype.saveViewState=function(b,d,g,l){g||(d.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),d.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),d.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),d.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),d.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),d.setAttribute("connect",null==b||b.connect?"1":"0"),d.setAttribute("arrows",null==b||b.arrows?"1":"0"),d.setAttribute("fold",
+null==b||b.foldingEnabled?"1":"0"));d.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);g=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=g&&(d.setAttribute("pageWidth",g.width),d.setAttribute("pageHeight",g.height));null!=b&&(null!=b.background&&d.setAttribute("background",b.background),l=this.getBackgroundImageObject(b.backgroundImage,l),null!=l&&d.setAttribute("backgroundImage",
+JSON.stringify(l)));d.setAttribute("math",(null==b?this.defaultMathEnabled:b.mathEnabled)?"1":"0");d.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null!=b&&null!=b.extFonts&&0<b.extFonts.length&&d.setAttribute("extFonts",b.extFonts.map(function(D){return D.name+"^"+D.url}).join("|"))};
Graph.prototype.getViewState=function(){return{defaultParent:this.defaultParent,currentRoot:this.view.currentRoot,gridEnabled:this.gridEnabled,gridSize:this.gridSize,guidesEnabled:this.graphHandler.guidesEnabled,foldingEnabled:this.foldingEnabled,shadowVisible:this.shadowVisible,scrollbars:this.scrollbars,pageVisible:this.pageVisible,background:this.background,backgroundImage:this.backgroundImage,pageScale:this.pageScale,pageFormat:this.pageFormat,tooltips:this.tooltipHandler.isEnabled(),connect:this.connectionHandler.isEnabled(),
arrows:this.connectionArrowsEnabled,scale:this.view.scale,scrollLeft:this.container.scrollLeft-this.view.translate.x*this.view.scale,scrollTop:this.container.scrollTop-this.view.translate.y*this.view.scale,translate:this.view.translate.clone(),lastPasteXml:this.lastPasteXml,pasteCounter:this.pasteCounter,mathEnabled:this.mathEnabled,hiddenTags:this.hiddenTags,extFonts:this.extFonts}};
-Graph.prototype.setViewState=function(b,e){if(null!=b){this.lastPasteXml=b.lastPasteXml;this.pasteCounter=b.pasteCounter||0;this.mathEnabled=b.mathEnabled;this.gridEnabled=b.gridEnabled;this.gridSize=b.gridSize;this.graphHandler.guidesEnabled=b.guidesEnabled;this.foldingEnabled=b.foldingEnabled;this.setShadowVisible(b.shadowVisible,!1);this.scrollbars=b.scrollbars;this.pageVisible=!this.isViewer()&&b.pageVisible;this.background=b.background;this.pageScale=b.pageScale;this.pageFormat=b.pageFormat;
-this.view.currentRoot=b.currentRoot;this.defaultParent=b.defaultParent;this.connectionArrowsEnabled=b.arrows;this.setTooltips(b.tooltips);this.setConnectable(b.connect);this.setBackgroundImage(b.backgroundImage);this.hiddenTags=b.hiddenTags;var k=this.extFonts;this.extFonts=b.extFonts||[];if(e&&null!=k)for(e=0;e<k.length;e++){var m=document.getElementById("extFont_"+k[e].name);null!=m&&m.parentNode.removeChild(m)}for(e=0;e<this.extFonts.length;e++)this.addExtFont(this.extFonts[e].name,this.extFonts[e].url,
+Graph.prototype.setViewState=function(b,d){if(null!=b){this.lastPasteXml=b.lastPasteXml;this.pasteCounter=b.pasteCounter||0;this.mathEnabled=b.mathEnabled;this.gridEnabled=b.gridEnabled;this.gridSize=b.gridSize;this.graphHandler.guidesEnabled=b.guidesEnabled;this.foldingEnabled=b.foldingEnabled;this.setShadowVisible(b.shadowVisible,!1);this.scrollbars=b.scrollbars;this.pageVisible=!this.isViewer()&&b.pageVisible;this.background=b.background;this.pageScale=b.pageScale;this.pageFormat=b.pageFormat;
+this.view.currentRoot=b.currentRoot;this.defaultParent=b.defaultParent;this.connectionArrowsEnabled=b.arrows;this.setTooltips(b.tooltips);this.setConnectable(b.connect);this.setBackgroundImage(b.backgroundImage);this.hiddenTags=b.hiddenTags;var g=this.extFonts;this.extFonts=b.extFonts||[];if(d&&null!=g)for(d=0;d<g.length;d++){var l=document.getElementById("extFont_"+g[d].name);null!=l&&l.parentNode.removeChild(l)}for(d=0;d<this.extFonts.length;d++)this.addExtFont(this.extFonts[d].name,this.extFonts[d].url,
!0);this.view.scale=null!=b.scale?b.scale:1;null==this.view.currentRoot||this.model.contains(this.view.currentRoot)||(this.view.currentRoot=null);null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer());null!=b.translate&&(this.view.translate=b.translate)}else this.view.currentRoot=null,this.view.scale=1,this.gridEnabled=this.defaultGridEnabled,this.gridSize=mxGraph.prototype.gridSize,this.pageScale=mxGraph.prototype.pageScale,this.pageFormat=
"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat(),this.pageVisible=this.defaultPageVisible,this.backgroundImage=this.background=null,this.scrollbars=this.defaultScrollbars,this.foldingEnabled=this.graphHandler.guidesEnabled=!0,this.setShadowVisible(!1,!1),this.defaultParent=null,this.setTooltips(!0),this.setConnectable(!0),this.lastPasteXml=null,this.pasteCounter=0,this.mathEnabled=this.defaultMathEnabled,this.connectionArrowsEnabled=
!0,this.hiddenTags=[],this.extFonts=[];this.preferPageSize=this.pageBreaksVisible=this.pageVisible;this.fireEvent(new mxEventObject("viewStateChanged","state",b))};
-Graph.prototype.addExtFont=function(b,e,k){if(b&&e){"1"!=urlParams["ext-fonts"]&&(Graph.recentCustomFonts[b.toLowerCase()]={name:b,url:e});var m="extFont_"+b;if(null==document.getElementById(m))if(0==e.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",e,null,m);else{document.getElementsByTagName("head");var C=document.createElement("style");C.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+b+'";\n\tsrc: url("'+e+'");\n}'));C.setAttribute("id",m);document.getElementsByTagName("head")[0].appendChild(C)}if(!k){null==
-this.extFonts&&(this.extFonts=[]);k=this.extFonts;m=!0;for(C=0;C<k.length;C++)if(k[C].name==b){m=!1;break}m&&this.extFonts.push({name:b,url:e})}}};
-EditorUi.prototype.updatePageRoot=function(b,e){if(null==b.root){e=this.editor.extractGraphModel(b.node,null,e);var k=Editor.extractParserError(e);if(k)throw Error(k);null!=e?(b.graphModelNode=e,b.viewState=this.editor.graph.createViewState(e),k=new mxCodec(e.ownerDocument),b.root=k.decode(e).root):b.root=this.editor.graph.model.createRoot()}else if(null==b.viewState){if(null==b.graphModelNode){e=this.editor.extractGraphModel(b.node);if(k=Editor.extractParserError(e))throw Error(k);null!=e&&(b.graphModelNode=
-e)}null!=b.graphModelNode&&(b.viewState=this.editor.graph.createViewState(b.graphModelNode))}return b};
-EditorUi.prototype.selectPage=function(b,e,k){try{if(b!=this.currentPage){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e=null!=e?e:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var m=this.editor.graph.model.createUndoableEdit();m.ignoreEdit=!0;var C=new SelectPage(this,b,k);C.execute();m.add(C);m.notify();this.editor.graph.tooltipHandler.hide();e||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",m))}}catch(p){this.handleError(p)}};
-EditorUi.prototype.selectNextPage=function(b){var e=this.currentPage;null!=e&&null!=this.pages&&(e=mxUtils.indexOf(this.pages,e),b?this.selectPage(this.pages[mxUtils.mod(e+1,this.pages.length)]):b||this.selectPage(this.pages[mxUtils.mod(e-1,this.pages.length)]))};
-EditorUi.prototype.insertPage=function(b,e){this.editor.graph.isEnabled()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1),b=null!=b?b:this.createPage(null,this.createPageId()),e=null!=e?e:this.pages.length,e=new ChangePage(this,b,b,e),this.editor.graph.model.execute(e));return b};EditorUi.prototype.createPageId=function(){do var b=Editor.guid();while(null!=this.getPageById(b));return b};
-EditorUi.prototype.createPage=function(b,e){e=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),e);e.setName(null!=b?b:this.createPageName());this.initDiagramNode(e);return e};EditorUi.prototype.createPageName=function(){for(var b={},e=0;e<this.pages.length;e++){var k=this.pages[e].getName();null!=k&&0<k.length&&(b[k]=k)}e=this.pages.length;do k=mxResources.get("pageWithNumber",[++e]);while(null!=b[k]);return k};
-EditorUi.prototype.removePage=function(b){try{var e=this.editor.graph,k=mxUtils.indexOf(this.pages,b);if(e.isEnabled()&&0<=k){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e.model.beginUpdate();try{var m=this.currentPage;m==b&&1<this.pages.length?(k==this.pages.length-1?k--:k++,m=this.pages[k]):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(C){this.handleError(C)}return b};
-EditorUi.prototype.duplicatePage=function(b,e){var k=null;try{var m=this.editor.graph;if(m.isEnabled()){m.isEditing()&&m.stopEditing();var C=b.node.cloneNode(!1);C.removeAttribute("id");var p={},F=m.createCellLookup([m.model.root]);k=new DiagramPage(C);k.root=m.cloneCell(m.model.root,null,p);var L=new mxGraphModel;L.prefix=Editor.guid()+"-";L.setRoot(k.root);m.updateCustomLinks(m.createCellMapping(p,F),[k.root]);k.viewState=b==this.currentPage?m.getViewState():b.viewState;this.initDiagramNode(k);
-k.viewState.scale=1;k.viewState.scrollLeft=null;k.viewState.scrollTop=null;k.viewState.currentRoot=null;k.viewState.defaultParent=null;k.setName(e);k=this.insertPage(k,mxUtils.indexOf(this.pages,b)+1)}}catch(P){this.handleError(P)}return k};EditorUi.prototype.initDiagramNode=function(b){var e=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root));this.editor.graph.saveViewState(b.viewState,e);mxUtils.setTextContent(b.node,Graph.compressNode(e))};
-EditorUi.prototype.clonePages=function(b){for(var e=[],k=0;k<b.length;k++)e.push(this.clonePage(b[k]));return e};EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var e=new DiagramPage(b.node.cloneNode(!0)),k=b==this.currentPage?this.editor.graph.getViewState():b.viewState;e.viewState=mxUtils.clone(k,EditorUi.transientViewStateProperties);e.root=this.editor.graph.model.cloneCell(b.root,null,!0);return e};
-EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var e=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(k){null!=k&&0<k.length&&this.editor.graph.model.execute(new RenamePage(this,b,k))}),mxResources.get("rename"));this.showDialog(e.container,300,80,!0,!0);e.init()}return b};EditorUi.prototype.movePage=function(b,e){this.editor.graph.model.execute(new MovePage(this,b,e))};
+Graph.prototype.addExtFont=function(b,d,g){if(b&&d){"1"!=urlParams["ext-fonts"]&&(Graph.recentCustomFonts[b.toLowerCase()]={name:b,url:d});var l="extFont_"+b;if(null==document.getElementById(l))if(0==d.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",d,null,l);else{document.getElementsByTagName("head");var D=document.createElement("style");D.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+b+'";\n\tsrc: url("'+d+'");\n}'));D.setAttribute("id",l);document.getElementsByTagName("head")[0].appendChild(D)}if(!g){null==
+this.extFonts&&(this.extFonts=[]);g=this.extFonts;l=!0;for(D=0;D<g.length;D++)if(g[D].name==b){l=!1;break}l&&this.extFonts.push({name:b,url:d})}}};
+EditorUi.prototype.updatePageRoot=function(b,d){if(null==b.root){d=this.editor.extractGraphModel(b.node,null,d);var g=Editor.extractParserError(d);if(g)throw Error(g);null!=d?(b.graphModelNode=d,b.viewState=this.editor.graph.createViewState(d),g=new mxCodec(d.ownerDocument),b.root=g.decode(d).root):b.root=this.editor.graph.model.createRoot()}else if(null==b.viewState){if(null==b.graphModelNode){d=this.editor.extractGraphModel(b.node);if(g=Editor.extractParserError(d))throw Error(g);null!=d&&(b.graphModelNode=
+d)}null!=b.graphModelNode&&(b.viewState=this.editor.graph.createViewState(b.graphModelNode))}return b};
+EditorUi.prototype.selectPage=function(b,d,g){try{if(b!=this.currentPage){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);d=null!=d?d:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var l=this.editor.graph.model.createUndoableEdit();l.ignoreEdit=!0;var D=new SelectPage(this,b,g);D.execute();l.add(D);l.notify();this.editor.graph.tooltipHandler.hide();d||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",l))}}catch(p){this.handleError(p)}};
+EditorUi.prototype.selectNextPage=function(b){var d=this.currentPage;null!=d&&null!=this.pages&&(d=mxUtils.indexOf(this.pages,d),b?this.selectPage(this.pages[mxUtils.mod(d+1,this.pages.length)]):b||this.selectPage(this.pages[mxUtils.mod(d-1,this.pages.length)]))};
+EditorUi.prototype.insertPage=function(b,d){this.editor.graph.isEnabled()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1),b=null!=b?b:this.createPage(null,this.createPageId()),d=null!=d?d:this.pages.length,d=new ChangePage(this,b,b,d),this.editor.graph.model.execute(d));return b};EditorUi.prototype.createPageId=function(){do var b=Editor.guid();while(null!=this.getPageById(b));return b};
+EditorUi.prototype.createPage=function(b,d){d=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),d);d.setName(null!=b?b:this.createPageName());this.initDiagramNode(d);return d};EditorUi.prototype.createPageName=function(){for(var b={},d=0;d<this.pages.length;d++){var g=this.pages[d].getName();null!=g&&0<g.length&&(b[g]=g)}d=this.pages.length;do g=mxResources.get("pageWithNumber",[++d]);while(null!=b[g]);return g};
+EditorUi.prototype.removePage=function(b){try{var d=this.editor.graph,g=mxUtils.indexOf(this.pages,b);if(d.isEnabled()&&0<=g){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);d.model.beginUpdate();try{var l=this.currentPage;l==b&&1<this.pages.length?(g==this.pages.length-1?g--:g++,l=this.pages[g]):1>=this.pages.length&&(l=this.insertPage(),d.model.execute(new RenamePage(this,l,mxResources.get("pageWithNumber",[1]))));d.model.execute(new ChangePage(this,b,l))}finally{d.model.endUpdate()}}}catch(D){this.handleError(D)}return b};
+EditorUi.prototype.duplicatePage=function(b,d){var g=null;try{var l=this.editor.graph;if(l.isEnabled()){l.isEditing()&&l.stopEditing();var D=b.node.cloneNode(!1);D.removeAttribute("id");var p={},E=l.createCellLookup([l.model.root]);g=new DiagramPage(D);g.root=l.cloneCell(l.model.root,null,p);var N=new mxGraphModel;N.prefix=Editor.guid()+"-";N.setRoot(g.root);l.updateCustomLinks(l.createCellMapping(p,E),[g.root]);g.viewState=b==this.currentPage?l.getViewState():b.viewState;this.initDiagramNode(g);
+g.viewState.scale=1;g.viewState.scrollLeft=null;g.viewState.scrollTop=null;g.viewState.currentRoot=null;g.viewState.defaultParent=null;g.setName(d);g=this.insertPage(g,mxUtils.indexOf(this.pages,b)+1)}}catch(R){this.handleError(R)}return g};EditorUi.prototype.initDiagramNode=function(b){var d=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root));this.editor.graph.saveViewState(b.viewState,d);mxUtils.setTextContent(b.node,Graph.compressNode(d))};
+EditorUi.prototype.clonePages=function(b){for(var d=[],g=0;g<b.length;g++)d.push(this.clonePage(b[g]));return d};EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var d=new DiagramPage(b.node.cloneNode(!0)),g=b==this.currentPage?this.editor.graph.getViewState():b.viewState;d.viewState=mxUtils.clone(g,EditorUi.transientViewStateProperties);d.root=this.editor.graph.model.cloneCell(b.root,null,!0);return d};
+EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var d=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(g){null!=g&&0<g.length&&this.editor.graph.model.execute(new RenamePage(this,b,g))}),mxResources.get("rename"));this.showDialog(d.container,300,80,!0,!0);d.init()}return b};EditorUi.prototype.movePage=function(b,d){this.editor.graph.model.execute(new MovePage(this,b,d))};
EditorUi.prototype.createTabContainer=function(){var b=document.createElement("div");b.className="geTabContainer";b.style.position="absolute";b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.height="0px";return b};
-EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,e=document.createElement("div");e.style.position="relative";e.style.display="inline-block";e.style.verticalAlign="top";e.style.height=this.tabContainer.style.height;e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.fontSize="13px";e.style.marginLeft="30px";for(var k=this.editor.isChromelessView()?29:59,m=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-k)/this.pages.length)+
-1),C=null,p=0;p<this.pages.length;p++)mxUtils.bind(this,function(d,f){this.pages[d]==this.currentPage?(f.className="geActivePage",f.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:"#fff"):f.className="geInactivePage";f.setAttribute("draggable","true");mxEvent.addListener(f,"dragstart",mxUtils.bind(this,function(g){b.isEnabled()?(mxClient.IS_FF&&g.dataTransfer.setData("Text","<diagram/>"),C=d):mxEvent.consume(g)}));mxEvent.addListener(f,"dragend",mxUtils.bind(this,function(g){C=null;g.stopPropagation();
-g.preventDefault()}));mxEvent.addListener(f,"dragover",mxUtils.bind(this,function(g){null!=C&&(g.dataTransfer.dropEffect="move");g.stopPropagation();g.preventDefault()}));mxEvent.addListener(f,"drop",mxUtils.bind(this,function(g){null!=C&&d!=C&&this.movePage(C,d);g.stopPropagation();g.preventDefault()}));e.appendChild(f)})(p,this.createTabForPage(this.pages[p],m,this.pages[p]!=this.currentPage,p+1));this.tabContainer.innerText="";this.tabContainer.appendChild(e);m=this.createPageMenuTab();this.tabContainer.appendChild(m);
-m=null;this.isPageInsertTabVisible()&&(m=this.createPageInsertTab(),this.tabContainer.appendChild(m));if(e.clientWidth>this.tabContainer.clientWidth-k){null!=m&&(m.style.position="absolute",m.style.right="0px",e.style.marginRight="30px");var F=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");F.style.position="absolute";F.style.right=this.editor.chromeless?"29px":"55px";F.style.fontSize="13pt";this.tabContainer.appendChild(F);var L=this.createControlTab(4,"&nbsp;&#10095;");L.style.position="absolute";
-L.style.right=this.editor.chromeless?"0px":"29px";L.style.fontSize="13pt";this.tabContainer.appendChild(L);var P=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));e.style.width=P+"px";mxEvent.addListener(F,"click",mxUtils.bind(this,function(d){e.scrollLeft-=Math.max(20,P-20);mxUtils.setOpacity(F,0<e.scrollLeft?100:50);mxUtils.setOpacity(L,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(d)}));mxUtils.setOpacity(F,0<e.scrollLeft?100:50);mxUtils.setOpacity(L,
-e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.addListener(L,"click",mxUtils.bind(this,function(d){e.scrollLeft+=Math.max(20,P-20);mxUtils.setOpacity(F,0<e.scrollLeft?100:50);mxUtils.setOpacity(L,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(d)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
-EditorUi.prototype.createTab=function(b){var e=document.createElement("div");e.style.display="inline-block";e.style.whiteSpace="nowrap";e.style.boxSizing="border-box";e.style.position="relative";e.style.overflow="hidden";e.style.textAlign="center";e.style.marginLeft="-1px";e.style.height=this.tabContainer.clientHeight+"px";e.style.padding="12px 4px 8px 4px";e.style.border=Editor.isDarkMode()?"1px solid #505759":"1px solid #e8eaed";e.style.borderTopStyle="none";e.style.borderBottomStyle="none";e.style.backgroundColor=
-this.tabContainer.style.backgroundColor;e.style.cursor="move";e.style.color="gray";b&&(mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(k){this.editor.graph.isMouseDown||(e.style.backgroundColor=Editor.isDarkMode()?"black":"#e8eaed",mxEvent.consume(k))})),mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(k){e.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(k)})));return e};
-EditorUi.prototype.createControlTab=function(b,e,k){k=this.createTab(null!=k?k:!0);k.style.lineHeight=this.tabContainerHeight+"px";k.style.paddingTop=b+"px";k.style.cursor="pointer";k.style.width="30px";k.innerHTML=e;null!=k.firstChild&&null!=k.firstChild.style&&mxUtils.setOpacity(k.firstChild,40);return k};EditorUi.prototype.getShortPageName=function(b){b=b.getName();36<b.length&&(b=b.substring(0,34)+"...");return b};
-EditorUi.prototype.createPageMenuTab=function(b,e){b=this.createControlTab(3,'<div class="geSprite geSprite-dots"></div>',b);b.setAttribute("title",mxResources.get("pages"));b.style.position="absolute";b.style.marginLeft="0px";b.style.top="0px";b.style.left="1px";var k=b.getElementsByTagName("div")[0];k.style.display="inline-block";k.style.marginTop="5px";k.style.width="21px";k.style.height="21px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(m){this.editor.graph.popupMenuHandler.hideMenu();
-var C=new mxPopupMenu(mxUtils.bind(this,function(L,P){var d=mxUtils.bind(this,function(){for(var y=0;y<this.pages.length;y++)mxUtils.bind(this,function(t){var G=L.addItem(this.getShortPageName(this.pages[t]),null,mxUtils.bind(this,function(){this.selectPage(this.pages[t])}),P),D=this.pages[t].getId();G.setAttribute("title",this.pages[t].getName()+" ("+(t+1)+"/"+this.pages.length+")"+(null!=D?" ["+D+"]":""));this.pages[t]==this.currentPage&&L.addCheckmark(G,Editor.checkmarkImage)})(y)}),f=mxUtils.bind(this,
-function(){L.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),P)});e||d();if(this.editor.graph.isEnabled()){e||(L.addSeparator(P),f());var g=this.currentPage;if(null!=g){L.addSeparator(P);var x=this.getShortPageName(g);L.addItem(mxResources.get("removeIt",[x]),null,mxUtils.bind(this,function(){this.removePage(g)}),P);L.addItem(mxResources.get("renameIt",[x]),null,mxUtils.bind(this,function(){this.renamePage(g,g.getName())}),P);e||L.addSeparator(P);L.addItem(mxResources.get("duplicateIt",
-[x]),null,mxUtils.bind(this,function(){this.duplicatePage(g,mxResources.get("copyOf",[g.getName()]))}),P)}}e&&(L.addSeparator(P),f(),L.addSeparator(P),d())}));C.div.className+=" geMenubarMenu";C.smartSeparators=!0;C.showDisabled=!0;C.autoExpand=!0;C.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(C,arguments);C.destroy()});var p=mxEvent.getClientX(m),F=mxEvent.getClientY(m);C.popup(p,F,null,m);this.setCurrentMenu(C);mxEvent.consume(m)}));return b};
-EditorUi.prototype.createPageInsertTab=function(){var b=this.createControlTab(4,'<div class="geSprite geSprite-plus"></div>');b.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(b,"click",mxUtils.bind(this,function(k){this.insertPage();mxEvent.consume(k)}));var e=b.getElementsByTagName("div")[0];e.style.display="inline-block";e.style.width="21px";e.style.height="21px";return b};
-EditorUi.prototype.createTabForPage=function(b,e,k,m){k=this.createTab(k);var C=b.getName()||mxResources.get("untitled"),p=b.getId();k.setAttribute("title",C+(null!=p?" ("+p+")":"")+" ["+m+"]");mxUtils.write(k,C);k.style.maxWidth=e+"px";k.style.width=e+"px";this.addTabListeners(b,k);42<e&&(k.style.textOverflow="ellipsis");return k};
-EditorUi.prototype.addTabListeners=function(b,e){mxEvent.disableContextMenu(e);var k=this.editor.graph;mxEvent.addListener(e,"dblclick",mxUtils.bind(this,function(p){this.renamePage(b);mxEvent.consume(p)}));var m=!1,C=!1;mxEvent.addGestureListeners(e,mxUtils.bind(this,function(p){m=null!=this.currentMenu;C=b==this.currentPage;k.isMouseDown||C||this.selectPage(b)}),null,mxUtils.bind(this,function(p){if(k.isEnabled()&&!k.isMouseDown&&(mxEvent.isTouchEvent(p)&&C||mxEvent.isPopupTrigger(p))){k.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(p)||!m){var F=new mxPopupMenu(this.createPageMenu(b));F.div.className+=" geMenubarMenu";F.smartSeparators=!0;F.showDisabled=!0;F.autoExpand=!0;F.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(F,arguments);this.resetCurrentMenu();F.destroy()});var L=mxEvent.getClientX(p),P=mxEvent.getClientY(p);F.popup(L,P,null,p);this.setCurrentMenu(F,e)}mxEvent.consume(p)}}))};
-EditorUi.prototype.getLinkForPage=function(b,e,k){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var m=this.getCurrentFile();if(null!=m&&m.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var C=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages sketch".split(" "));C+=(0==C.length?"?":"&")+"page-id="+b.getId();null!=e&&(C+="&"+e.join("&"));return(k&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
-EditorUi.drawHost:"https://"+window.location.host)+"/"+C+"#"+m.getHash()}}return null};
-EditorUi.prototype.createPageMenu=function(b,e){return mxUtils.bind(this,function(k,m){var C=this.editor.graph;k.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),m);k.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),m);k.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,e)}),m);null!=this.getLinkForPage(b)&&(k.addSeparator(m),k.addItem(mxResources.get("link"),
-null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(p,F,L,P,d,f){p=this.createUrlParameters(p,F,L,P,d,f);L||p.push("hide-pages=1");C.isSelectionEmpty()||(L=C.getBoundingBox(C.getSelectionCells()),F=C.view.translate,d=C.view.scale,L.width/=d,L.height/=d,L.x=L.x/d-F.x,L.y=L.y/d-F.y,p.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(L.x),y:Math.round(L.y),width:Math.round(L.width),height:Math.round(L.height),border:100}))));
-P=new EmbedDialog(this,this.getLinkForPage(b,p,P));this.showDialog(P.container,450,240,!0,!0);P.init()}))})));k.addSeparator(m);k.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),m);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(k.addSeparator(m),k.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,
-!0,!0))}),m))})};(function(){var b=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(){b.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(e,k,m){m.ui=e.ui;return k};b.afterDecode=function(e,k,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,k,m){m.ui=e.ui;return k};b.afterDecode=function(e,k,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 neverShown page previousPage".split(" "));b.afterEncode=function(e,k,m){m.setAttribute("relatedPage",k.relatedPage.getId());null==k.index&&(m.setAttribute("name",k.relatedPage.getName()),null!=k.relatedPage.viewState&&m.setAttribute("viewState",JSON.stringify(k.relatedPage.viewState,function(C,p){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,C)?p:void 0})),null!=k.relatedPage.root&&e.encodeCell(k.relatedPage.root,
-m));return m};b.beforeDecode=function(e,k,m){m.ui=e.ui;m.relatedPage=m.ui.getPageById(k.getAttribute("relatedPage"));if(null==m.relatedPage){var C=k.ownerDocument.createElement("diagram");C.setAttribute("id",k.getAttribute("relatedPage"));C.setAttribute("name",k.getAttribute("name"));m.relatedPage=new DiagramPage(C);C=k.getAttribute("viewState");null!=C&&(m.relatedPage.viewState=JSON.parse(C),k.removeAttribute("viewState"));k=k.cloneNode(!0);C=k.firstChild;if(null!=C)for(m.relatedPage.root=e.decodeCell(C,
-!1),m=C.nextSibling,C.parentNode.removeChild(C),C=m;null!=C;){m=C.nextSibling;if(C.nodeType==mxConstants.NODETYPE_ELEMENT){var p=C.getAttribute("id");null==e.lookup(p)&&e.decodeCell(C)}C.parentNode.removeChild(C);C=m}}return k};b.afterDecode=function(e,k,m){m.index=m.previousIndex;return m};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(m,C,p,F,L){C=null!=C?C:!1;null==p&&(p=this.getFoldableCells(this.getSelectionCells(),m));this.stopEditing();this.model.beginUpdate();try{for(var P=p.slice(),d=0;d<p.length;d++)"1"==mxUtils.getValue(this.getCurrentCellStyle(p[d]),"treeFolding","0")&&this.foldTreeCell(m,p[d]);p=P;p=b.apply(this,arguments)}finally{this.model.endUpdate()}return p};Graph.prototype.foldTreeCell=
-function(m,C){this.model.beginUpdate();try{var p=[];this.traverse(C,!0,mxUtils.bind(this,function(L,P){var d=null!=P&&this.isTreeEdge(P);d&&p.push(P);L==C||null!=P&&!d||p.push(L);return(null==P||d)&&(L==C||!this.model.isCollapsed(L))}));this.model.setCollapsed(C,m);for(var F=0;F<p.length;F++)this.model.setVisible(p[F],!m)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(m){return!this.isEdgeIgnored(m)};Graph.prototype.getTreeEdges=function(m,C,p,F,L,P){return this.model.filterCells(this.getEdges(m,
-C,p,F,L,P),mxUtils.bind(this,function(d){return this.isTreeEdge(d)}))};Graph.prototype.getIncomingTreeEdges=function(m,C){return this.getTreeEdges(m,C,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(m,C){return this.getTreeEdges(m,C,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function m(N){return G.isVertex(N)&&p(N)}function C(N){var aa=
-!1;null!=N&&(aa="1"==t.getCurrentCellStyle(N).treeMoving);return aa}function p(N){var aa=!1;null!=N&&(N=G.getParent(N),aa=t.view.getState(N),aa="tree"==(null!=aa?aa.style:t.getCellStyle(N)).containerType);return aa}function F(N){var aa=!1;null!=N&&(N=G.getParent(N),aa=t.view.getState(N),t.view.getState(N),aa=null!=(null!=aa?aa.style:t.getCellStyle(N)).childLayout);return aa}function L(N){N=t.view.getState(N);if(null!=N){var aa=t.getIncomingTreeEdges(N.cell);if(0<aa.length&&(aa=t.view.getState(aa[0]),
-null!=aa&&(aa=aa.absolutePoints,null!=aa&&0<aa.length&&(aa=aa[aa.length-1],null!=aa)))){if(aa.y==N.y&&Math.abs(aa.x-N.getCenterX())<N.width/2)return mxConstants.DIRECTION_SOUTH;if(aa.y==N.y+N.height&&Math.abs(aa.x-N.getCenterX())<N.width/2)return mxConstants.DIRECTION_NORTH;if(aa.x>N.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function P(N,aa){aa=null!=aa?aa:!0;t.model.beginUpdate();try{var V=t.model.getParent(N),ha=t.getIncomingTreeEdges(N),X=t.cloneCells([ha[0],
-N]);t.model.setTerminal(X[0],t.model.getTerminal(ha[0],!0),!0);var ia=L(N),q=V.geometry;ia==mxConstants.DIRECTION_SOUTH||ia==mxConstants.DIRECTION_NORTH?X[1].geometry.x+=aa?N.geometry.width+10:-X[1].geometry.width-10:X[1].geometry.y+=aa?N.geometry.height+10:-X[1].geometry.height-10;t.view.currentRoot!=V&&(X[1].geometry.x-=q.x,X[1].geometry.y-=q.y);var E=t.view.getState(N),Q=t.view.scale;if(null!=E){var Y=mxRectangle.fromRectangle(E);ia==mxConstants.DIRECTION_SOUTH||ia==mxConstants.DIRECTION_NORTH?
-Y.x+=(aa?N.geometry.width+10:-X[1].geometry.width-10)*Q:Y.y+=(aa?N.geometry.height+10:-X[1].geometry.height-10)*Q;var R=t.getOutgoingTreeEdges(t.model.getTerminal(ha[0],!0));if(null!=R){for(var Z=ia==mxConstants.DIRECTION_SOUTH||ia==mxConstants.DIRECTION_NORTH,da=q=ha=0;da<R.length;da++){var qa=t.model.getTerminal(R[da],!1);if(ia==L(qa)){var va=t.view.getState(qa);qa!=N&&null!=va&&(Z&&aa!=va.getCenterX()<E.getCenterX()||!Z&&aa!=va.getCenterY()<E.getCenterY())&&mxUtils.intersects(Y,va)&&(ha=10+Math.max(ha,
-(Math.min(Y.x+Y.width,va.x+va.width)-Math.max(Y.x,va.x))/Q),q=10+Math.max(q,(Math.min(Y.y+Y.height,va.y+va.height)-Math.max(Y.y,va.y))/Q))}}Z?q=0:ha=0;for(da=0;da<R.length;da++)if(qa=t.model.getTerminal(R[da],!1),ia==L(qa)&&(va=t.view.getState(qa),qa!=N&&null!=va&&(Z&&aa!=va.getCenterX()<E.getCenterX()||!Z&&aa!=va.getCenterY()<E.getCenterY()))){var ja=[];t.traverse(va.cell,!0,function(sa,ya){var Aa=null!=ya&&t.isTreeEdge(ya);Aa&&ja.push(ya);(null==ya||Aa)&&ja.push(sa);return null==ya||Aa});t.moveCells(ja,
-(aa?1:-1)*ha,(aa?1:-1)*q)}}}return t.addCells(X,V)}finally{t.model.endUpdate()}}function d(N){t.model.beginUpdate();try{var aa=L(N),V=t.getIncomingTreeEdges(N),ha=t.cloneCells([V[0],N]);t.model.setTerminal(V[0],ha[1],!1);t.model.setTerminal(ha[0],ha[1],!0);t.model.setTerminal(ha[0],N,!1);var X=t.model.getParent(N),ia=X.geometry,q=[];t.view.currentRoot!=X&&(ha[1].geometry.x-=ia.x,ha[1].geometry.y-=ia.y);t.traverse(N,!0,function(Y,R){var Z=null!=R&&t.isTreeEdge(R);Z&&q.push(R);(null==R||Z)&&q.push(Y);
-return null==R||Z});var E=N.geometry.width+40,Q=N.geometry.height+40;aa==mxConstants.DIRECTION_SOUTH?E=0:aa==mxConstants.DIRECTION_NORTH?(E=0,Q=-Q):aa==mxConstants.DIRECTION_WEST?(E=-E,Q=0):aa==mxConstants.DIRECTION_EAST&&(Q=0);t.moveCells(q,E,Q);return t.addCells(ha,X)}finally{t.model.endUpdate()}}function f(N,aa){t.model.beginUpdate();try{var V=t.model.getParent(N),ha=t.getIncomingTreeEdges(N),X=L(N);0==ha.length&&(ha=[t.createEdge(V,null,"",null,null,t.createCurrentEdgeStyle())],X=aa);var ia=t.cloneCells([ha[0],
-N]);t.model.setTerminal(ia[0],N,!0);if(null==t.model.getTerminal(ia[0],!1)){t.model.setTerminal(ia[0],ia[1],!1);var q=t.getCellStyle(ia[1]).newEdgeStyle;if(null!=q)try{var E=JSON.parse(q),Q;for(Q in E)t.setCellStyles(Q,E[Q],[ia[0]]),"edgeStyle"==Q&&"elbowEdgeStyle"==E[Q]&&t.setCellStyles("elbow",X==mxConstants.DIRECTION_SOUTH||X==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[ia[0]])}catch(va){}}ha=t.getOutgoingTreeEdges(N);var Y=V.geometry;aa=[];t.view.currentRoot==V&&(Y=new mxRectangle);for(q=
-0;q<ha.length;q++){var R=t.model.getTerminal(ha[q],!1);null!=R&&aa.push(R)}var Z=t.view.getBounds(aa),da=t.view.translate,qa=t.view.scale;X==mxConstants.DIRECTION_SOUTH?(ia[1].geometry.x=null==Z?N.geometry.x+(N.geometry.width-ia[1].geometry.width)/2:(Z.x+Z.width)/qa-da.x-Y.x+10,ia[1].geometry.y+=ia[1].geometry.height-Y.y+40):X==mxConstants.DIRECTION_NORTH?(ia[1].geometry.x=null==Z?N.geometry.x+(N.geometry.width-ia[1].geometry.width)/2:(Z.x+Z.width)/qa-da.x+-Y.x+10,ia[1].geometry.y-=ia[1].geometry.height+
-Y.y+40):(ia[1].geometry.x=X==mxConstants.DIRECTION_WEST?ia[1].geometry.x-(ia[1].geometry.width+Y.x+40):ia[1].geometry.x+(ia[1].geometry.width-Y.x+40),ia[1].geometry.y=null==Z?N.geometry.y+(N.geometry.height-ia[1].geometry.height)/2:(Z.y+Z.height)/qa-da.y+-Y.y+10);return t.addCells(ia,V)}finally{t.model.endUpdate()}}function g(N,aa,V){N=t.getOutgoingTreeEdges(N);V=t.view.getState(V);var ha=[];if(null!=V&&null!=N){for(var X=0;X<N.length;X++){var ia=t.view.getState(t.model.getTerminal(N[X],!1));null!=
-ia&&(!aa&&Math.min(ia.x+ia.width,V.x+V.width)>=Math.max(ia.x,V.x)||aa&&Math.min(ia.y+ia.height,V.y+V.height)>=Math.max(ia.y,V.y))&&ha.push(ia)}ha.sort(function(q,E){return aa?q.x+q.width-E.x-E.width:q.y+q.height-E.y-E.height})}return ha}function x(N,aa){var V=L(N),ha=aa==mxConstants.DIRECTION_EAST||aa==mxConstants.DIRECTION_WEST;(V==mxConstants.DIRECTION_EAST||V==mxConstants.DIRECTION_WEST)==ha&&V!=aa?y.actions.get("selectParent").funct():V==aa?(aa=t.getOutgoingTreeEdges(N),null!=aa&&0<aa.length&&
-t.setSelectionCell(t.model.getTerminal(aa[0],!1))):(V=t.getIncomingTreeEdges(N),null!=V&&0<V.length&&(ha=g(t.model.getTerminal(V[0],!0),ha,N),N=t.view.getState(N),null!=N&&(N=mxUtils.indexOf(ha,N),0<=N&&(N+=aa==mxConstants.DIRECTION_NORTH||aa==mxConstants.DIRECTION_WEST?-1:1,0<=N&&N<=ha.length-1&&t.setSelectionCell(ha[N].cell)))))}var y=this,t=y.editor.graph,G=t.getModel(),D=y.menus.createPopupMenu;y.menus.createPopupMenu=function(N,aa,V){D.apply(this,arguments);if(1==t.getSelectionCount()){aa=t.getSelectionCell();
-var ha=t.getOutgoingTreeEdges(aa);N.addSeparator();0<ha.length&&(m(t.getSelectionCell())&&this.addMenuItems(N,["selectChildren"],null,V),this.addMenuItems(N,["selectDescendants"],null,V));m(t.getSelectionCell())?(N.addSeparator(),0<t.getIncomingTreeEdges(aa).length&&this.addMenuItems(N,["selectSiblings","selectParent"],null,V)):0<t.model.getEdgeCount(aa)&&this.addMenuItems(N,["selectConnections"],null,V)}};y.actions.addAction("selectChildren",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var N=
-t.getSelectionCell();N=t.getOutgoingTreeEdges(N);if(null!=N){for(var aa=[],V=0;V<N.length;V++)aa.push(t.model.getTerminal(N[V],!1));t.setSelectionCells(aa)}}},null,null,"Alt+Shift+X");y.actions.addAction("selectSiblings",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var N=t.getSelectionCell();N=t.getIncomingTreeEdges(N);if(null!=N&&0<N.length&&(N=t.getOutgoingTreeEdges(t.model.getTerminal(N[0],!0)),null!=N)){for(var aa=[],V=0;V<N.length;V++)aa.push(t.model.getTerminal(N[V],!1));t.setSelectionCells(aa)}}},
-null,null,"Alt+Shift+S");y.actions.addAction("selectParent",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var N=t.getSelectionCell();N=t.getIncomingTreeEdges(N);null!=N&&0<N.length&&t.setSelectionCell(t.model.getTerminal(N[0],!0))}},null,null,"Alt+Shift+P");y.actions.addAction("selectDescendants",function(N,aa){N=t.getSelectionCell();if(t.isEnabled()&&t.model.isVertex(N)){if(null!=aa&&mxEvent.isAltDown(aa))t.setSelectionCells(t.model.getTreeEdges(N,null==aa||!mxEvent.isShiftDown(aa),null==
-aa||!mxEvent.isControlDown(aa)));else{var V=[];t.traverse(N,!0,function(ha,X){var ia=null!=X&&t.isTreeEdge(X);ia&&V.push(X);null!=X&&!ia||null!=aa&&mxEvent.isShiftDown(aa)||V.push(ha);return null==X||ia})}t.setSelectionCells(V)}},null,null,"Alt+Shift+D");var I=t.removeCells;t.removeCells=function(N,aa){aa=null!=aa?aa:!0;null==N&&(N=this.getDeletableCells(this.getSelectionCells()));aa&&(N=this.getDeletableCells(this.addAllEdges(N)));for(var V=[],ha=0;ha<N.length;ha++){var X=N[ha];G.isEdge(X)&&p(X)&&
-(V.push(X),X=G.getTerminal(X,!1));if(m(X)){var ia=[];t.traverse(X,!0,function(q,E){var Q=null!=E&&t.isTreeEdge(E);Q&&ia.push(E);(null==E||Q)&&ia.push(q);return null==E||Q});0<ia.length&&(V=V.concat(ia),X=t.getIncomingTreeEdges(N[ha]),N=N.concat(X))}else null!=X&&V.push(N[ha])}N=V;return I.apply(this,arguments)};y.hoverIcons.getStateAt=function(N,aa,V){return m(N.cell)?null:this.graph.view.getState(this.graph.getCellAt(aa,V))};var H=t.duplicateCells;t.duplicateCells=function(N,aa){N=null!=N?N:this.getSelectionCells();
-for(var V=N.slice(0),ha=0;ha<V.length;ha++){var X=t.view.getState(V[ha]);if(null!=X&&m(X.cell)){var ia=t.getIncomingTreeEdges(X.cell);for(X=0;X<ia.length;X++)mxUtils.remove(ia[X],N)}}this.model.beginUpdate();try{var q=H.call(this,N,aa);if(q.length==N.length)for(ha=0;ha<N.length;ha++)if(m(N[ha])){var E=t.getIncomingTreeEdges(q[ha]);ia=t.getIncomingTreeEdges(N[ha]);if(0==E.length&&0<ia.length){var Q=this.cloneCell(ia[0]);this.addEdge(Q,t.getDefaultParent(),this.model.getTerminal(ia[0],!0),q[ha])}}}finally{this.model.endUpdate()}return q};
-var S=t.moveCells;t.moveCells=function(N,aa,V,ha,X,ia,q){var E=null;this.model.beginUpdate();try{var Q=X,Y=this.getCurrentCellStyle(X);if(null!=N&&m(X)&&"1"==mxUtils.getValue(Y,"treeFolding","0")){for(var R=0;R<N.length;R++)if(m(N[R])||t.model.isEdge(N[R])&&null==t.model.getTerminal(N[R],!0)){X=t.model.getParent(N[R]);break}if(null!=Q&&X!=Q&&null!=this.view.getState(N[0])){var Z=t.getIncomingTreeEdges(N[0]);if(0<Z.length){var da=t.view.getState(t.model.getTerminal(Z[0],!0));if(null!=da){var qa=t.view.getState(Q);
-null!=qa&&(aa=(qa.getCenterX()-da.getCenterX())/t.view.scale,V=(qa.getCenterY()-da.getCenterY())/t.view.scale)}}}}E=S.apply(this,arguments);if(null!=E&&null!=N&&E.length==N.length)for(R=0;R<E.length;R++)if(this.model.isEdge(E[R]))m(Q)&&0>mxUtils.indexOf(E,this.model.getTerminal(E[R],!0))&&this.model.setTerminal(E[R],Q,!0);else if(m(N[R])&&(Z=t.getIncomingTreeEdges(N[R]),0<Z.length))if(!ha)m(Q)&&0>mxUtils.indexOf(N,this.model.getTerminal(Z[0],!0))&&this.model.setTerminal(Z[0],Q,!0);else if(0==t.getIncomingTreeEdges(E[R]).length){Y=
-Q;if(null==Y||Y==t.model.getParent(N[R]))Y=t.model.getTerminal(Z[0],!0);ha=this.cloneCell(Z[0]);this.addEdge(ha,t.getDefaultParent(),Y,E[R])}}finally{this.model.endUpdate()}return E};if(null!=y.sidebar){var T=y.sidebar.dropAndConnect;y.sidebar.dropAndConnect=function(N,aa,V,ha){var X=t.model,ia=null;X.beginUpdate();try{if(ia=T.apply(this,arguments),m(N))for(var q=0;q<ia.length;q++)if(X.isEdge(ia[q])&&null==X.getTerminal(ia[q],!0)){X.setTerminal(ia[q],N,!0);var E=t.getCellGeometry(ia[q]);E.points=
-null;null!=E.getTerminalPoint(!0)&&E.setTerminalPoint(null,!0)}}finally{X.endUpdate()}return ia}}var M={88:y.actions.get("selectChildren"),84:y.actions.get("selectSubtree"),80:y.actions.get("selectParent"),83:y.actions.get("selectSiblings")},fa=y.onKeyDown;y.onKeyDown=function(N){try{if(t.isEnabled()&&!t.isEditing()&&m(t.getSelectionCell())&&1==t.getSelectionCount()){var aa=null;0<t.getIncomingTreeEdges(t.getSelectionCell()).length&&(9==N.which?aa=mxEvent.isShiftDown(N)?d(t.getSelectionCell()):f(t.getSelectionCell()):
-13==N.which&&(aa=P(t.getSelectionCell(),!mxEvent.isShiftDown(N))));if(null!=aa&&0<aa.length)1==aa.length&&t.model.isEdge(aa[0])?t.setSelectionCell(t.model.getTerminal(aa[0],!1)):t.setSelectionCell(aa[aa.length-1]),null!=y.hoverIcons&&y.hoverIcons.update(t.view.getState(t.getSelectionCell())),t.startEditingAtCell(t.getSelectionCell()),mxEvent.consume(N);else if(mxEvent.isAltDown(N)&&mxEvent.isShiftDown(N)){var V=M[N.keyCode];null!=V&&(V.funct(N),mxEvent.consume(N))}else 37==N.keyCode?(x(t.getSelectionCell(),
-mxConstants.DIRECTION_WEST),mxEvent.consume(N)):38==N.keyCode?(x(t.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(N)):39==N.keyCode?(x(t.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(N)):40==N.keyCode&&(x(t.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(N))}}catch(ha){y.handleError(ha)}mxEvent.isConsumed(N)||fa.apply(this,arguments)};var la=t.connectVertex;t.connectVertex=function(N,aa,V,ha,X,ia,q){var E=t.getIncomingTreeEdges(N);if(m(N)){var Q=L(N),
-Y=Q==mxConstants.DIRECTION_EAST||Q==mxConstants.DIRECTION_WEST,R=aa==mxConstants.DIRECTION_EAST||aa==mxConstants.DIRECTION_WEST;return Q==aa||0==E.length?f(N,aa):Y==R?d(N):P(N,aa!=mxConstants.DIRECTION_NORTH&&aa!=mxConstants.DIRECTION_WEST)}return la.apply(this,arguments)};t.getSubtree=function(N){var aa=[N];!C(N)&&!m(N)||F(N)||t.traverse(N,!0,function(V,ha){var X=null!=ha&&t.isTreeEdge(ha);X&&0>mxUtils.indexOf(aa,ha)&&aa.push(ha);(null==ha||X)&&0>mxUtils.indexOf(aa,V)&&aa.push(V);return null==ha||
-X});return aa};var ra=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){ra.apply(this,arguments);(C(this.state.cell)||m(this.state.cell))&&!F(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",
-this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(N){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(N),mxEvent.getClientY(N),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(N);this.graph.isMouseDown=!0;y.hoverIcons.reset();mxEvent.consume(N)})))};var ba=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=
-function(){ba.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var oa=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(N){oa.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=N?"":"none")};var na=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=
-function(N,aa){na.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var k=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var m=k.apply(this,arguments),C=this.graph;return m.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 F=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');F.vertex=!0;var L=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;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;startArrow=none;endArrow=none;rounded=0;");
-P.geometry.relative=!0;P.edge=!0;F.insertEdge(P,!0);L.insertEdge(P,!1);p.insert(P);p.insert(F);p.insert(L);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var p=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");p.vertex=!0;var F=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};');
-F.vertex=!0;var L=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};');L.vertex=!0;var P=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");P.geometry.relative=!0;P.edge=!0;
-F.insertEdge(P,!0);L.insertEdge(P,!1);var d=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};');d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-f.geometry.relative=!0;f.edge=!0;F.insertEdge(f,!0);d.insertEdge(f,!1);var g=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};');g.vertex=!0;var x=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-x.geometry.relative=!0;x.edge=!0;F.insertEdge(x,!0);g.insertEdge(x,!1);var y=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};');y.vertex=!0;var t=new mxCell("",new mxGeometry(0,
-0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");t.geometry.relative=!0;t.edge=!0;F.insertEdge(t,!0);y.insertEdge(t,!1);p.insert(P);p.insert(f);p.insert(x);p.insert(t);p.insert(F);p.insert(L);p.insert(d);p.insert(g);p.insert(y);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var p=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');
+EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,d=document.createElement("div");d.style.position="relative";d.style.display="inline-block";d.style.verticalAlign="top";d.style.height=this.tabContainer.style.height;d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.fontSize="13px";d.style.marginLeft="30px";for(var g=this.editor.isChromelessView()?29:59,l=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-g)/this.pages.length)+
+1),D=null,p=0;p<this.pages.length;p++)mxUtils.bind(this,function(G,M){this.pages[G]==this.currentPage?(M.className="geActivePage",M.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:"#fff"):M.className="geInactivePage";M.setAttribute("draggable","true");mxEvent.addListener(M,"dragstart",mxUtils.bind(this,function(Q){b.isEnabled()?(mxClient.IS_FF&&Q.dataTransfer.setData("Text","<diagram/>"),D=G):mxEvent.consume(Q)}));mxEvent.addListener(M,"dragend",mxUtils.bind(this,function(Q){D=null;Q.stopPropagation();
+Q.preventDefault()}));mxEvent.addListener(M,"dragover",mxUtils.bind(this,function(Q){null!=D&&(Q.dataTransfer.dropEffect="move");Q.stopPropagation();Q.preventDefault()}));mxEvent.addListener(M,"drop",mxUtils.bind(this,function(Q){null!=D&&G!=D&&this.movePage(D,G);Q.stopPropagation();Q.preventDefault()}));d.appendChild(M)})(p,this.createTabForPage(this.pages[p],l,this.pages[p]!=this.currentPage,p+1));this.tabContainer.innerText="";this.tabContainer.appendChild(d);l=this.createPageMenuTab();this.tabContainer.appendChild(l);
+l=null;this.isPageInsertTabVisible()&&(l=this.createPageInsertTab(),this.tabContainer.appendChild(l));if(d.clientWidth>this.tabContainer.clientWidth-g){null!=l&&(l.style.position="absolute",l.style.right="0px",d.style.marginRight="30px");var E=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");E.style.position="absolute";E.style.right=this.editor.chromeless?"29px":"55px";E.style.fontSize="13pt";this.tabContainer.appendChild(E);var N=this.createControlTab(4,"&nbsp;&#10095;");N.style.position="absolute";
+N.style.right=this.editor.chromeless?"0px":"29px";N.style.fontSize="13pt";this.tabContainer.appendChild(N);var R=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));d.style.width=R+"px";mxEvent.addListener(E,"click",mxUtils.bind(this,function(G){d.scrollLeft-=Math.max(20,R-20);mxUtils.setOpacity(E,0<d.scrollLeft?100:50);mxUtils.setOpacity(N,d.scrollLeft<d.scrollWidth-d.clientWidth?100:50);mxEvent.consume(G)}));mxUtils.setOpacity(E,0<d.scrollLeft?100:50);mxUtils.setOpacity(N,
+d.scrollLeft<d.scrollWidth-d.clientWidth?100:50);mxEvent.addListener(N,"click",mxUtils.bind(this,function(G){d.scrollLeft+=Math.max(20,R-20);mxUtils.setOpacity(E,0<d.scrollLeft?100:50);mxUtils.setOpacity(N,d.scrollLeft<d.scrollWidth-d.clientWidth?100:50);mxEvent.consume(G)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
+EditorUi.prototype.createTab=function(b){var d=document.createElement("div");d.style.display="inline-block";d.style.whiteSpace="nowrap";d.style.boxSizing="border-box";d.style.position="relative";d.style.overflow="hidden";d.style.textAlign="center";d.style.marginLeft="-1px";d.style.height=this.tabContainer.clientHeight+"px";d.style.padding="12px 4px 8px 4px";d.style.border=Editor.isDarkMode()?"1px solid #505759":"1px solid #e8eaed";d.style.borderTopStyle="none";d.style.borderBottomStyle="none";d.style.backgroundColor=
+this.tabContainer.style.backgroundColor;d.style.cursor="move";d.style.color="gray";b&&(mxEvent.addListener(d,"mouseenter",mxUtils.bind(this,function(g){this.editor.graph.isMouseDown||(d.style.backgroundColor=Editor.isDarkMode()?"black":"#e8eaed",mxEvent.consume(g))})),mxEvent.addListener(d,"mouseleave",mxUtils.bind(this,function(g){d.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(g)})));return d};
+EditorUi.prototype.createControlTab=function(b,d,g){g=this.createTab(null!=g?g:!0);g.style.lineHeight=this.tabContainerHeight+"px";g.style.paddingTop=b+"px";g.style.cursor="pointer";g.style.width="30px";g.innerHTML=d;null!=g.firstChild&&null!=g.firstChild.style&&mxUtils.setOpacity(g.firstChild,40);return g};EditorUi.prototype.getShortPageName=function(b){b=b.getName();36<b.length&&(b=b.substring(0,34)+"...");return b};
+EditorUi.prototype.createPageMenuTab=function(b,d){b=this.createControlTab(3,'<div class="geSprite geSprite-dots"></div>',b);b.setAttribute("title",mxResources.get("pages"));b.style.position="absolute";b.style.marginLeft="0px";b.style.top="0px";b.style.left="1px";var g=b.getElementsByTagName("div")[0];g.style.display="inline-block";g.style.marginTop="5px";g.style.width="21px";g.style.height="21px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(l){this.editor.graph.popupMenuHandler.hideMenu();
+var D=new mxPopupMenu(mxUtils.bind(this,function(N,R){var G=mxUtils.bind(this,function(){for(var f=0;f<this.pages.length;f++)mxUtils.bind(this,function(k){var z=N.addItem(this.getShortPageName(this.pages[k]),null,mxUtils.bind(this,function(){this.selectPage(this.pages[k])}),R),t=this.pages[k].getId();z.setAttribute("title",this.pages[k].getName()+" ("+(k+1)+"/"+this.pages.length+")"+(null!=t?" ["+t+"]":""));this.pages[k]==this.currentPage&&N.addCheckmark(z,Editor.checkmarkImage)})(f)}),M=mxUtils.bind(this,
+function(){N.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),R)});d||G();if(this.editor.graph.isEnabled()){d||(N.addSeparator(R),M());var Q=this.currentPage;if(null!=Q){N.addSeparator(R);var e=this.getShortPageName(Q);N.addItem(mxResources.get("removeIt",[e]),null,mxUtils.bind(this,function(){this.removePage(Q)}),R);N.addItem(mxResources.get("renameIt",[e]),null,mxUtils.bind(this,function(){this.renamePage(Q,Q.getName())}),R);d||N.addSeparator(R);N.addItem(mxResources.get("duplicateIt",
+[e]),null,mxUtils.bind(this,function(){this.duplicatePage(Q,mxResources.get("copyOf",[Q.getName()]))}),R)}}d&&(N.addSeparator(R),M(),N.addSeparator(R),G())}));D.div.className+=" geMenubarMenu";D.smartSeparators=!0;D.showDisabled=!0;D.autoExpand=!0;D.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(D,arguments);D.destroy()});var p=mxEvent.getClientX(l),E=mxEvent.getClientY(l);D.popup(p,E,null,l);this.setCurrentMenu(D);mxEvent.consume(l)}));return b};
+EditorUi.prototype.createPageInsertTab=function(){var b=this.createControlTab(4,'<div class="geSprite geSprite-plus"></div>');b.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(b,"click",mxUtils.bind(this,function(g){this.insertPage();mxEvent.consume(g)}));var d=b.getElementsByTagName("div")[0];d.style.display="inline-block";d.style.width="21px";d.style.height="21px";return b};
+EditorUi.prototype.createTabForPage=function(b,d,g,l){g=this.createTab(g);var D=b.getName()||mxResources.get("untitled"),p=b.getId();g.setAttribute("title",D+(null!=p?" ("+p+")":"")+" ["+l+"]");mxUtils.write(g,D);g.style.maxWidth=d+"px";g.style.width=d+"px";this.addTabListeners(b,g);42<d&&(g.style.textOverflow="ellipsis");return g};
+EditorUi.prototype.addTabListeners=function(b,d){mxEvent.disableContextMenu(d);var g=this.editor.graph;mxEvent.addListener(d,"dblclick",mxUtils.bind(this,function(p){this.renamePage(b);mxEvent.consume(p)}));var l=!1,D=!1;mxEvent.addGestureListeners(d,mxUtils.bind(this,function(p){l=null!=this.currentMenu;D=b==this.currentPage;g.isMouseDown||D||this.selectPage(b)}),null,mxUtils.bind(this,function(p){if(g.isEnabled()&&!g.isMouseDown&&(mxEvent.isTouchEvent(p)&&D||mxEvent.isPopupTrigger(p))){g.popupMenuHandler.hideMenu();
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(p)||!l){var E=new mxPopupMenu(this.createPageMenu(b));E.div.className+=" geMenubarMenu";E.smartSeparators=!0;E.showDisabled=!0;E.autoExpand=!0;E.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(E,arguments);this.resetCurrentMenu();E.destroy()});var N=mxEvent.getClientX(p),R=mxEvent.getClientY(p);E.popup(N,R,null,p);this.setCurrentMenu(E,d)}mxEvent.consume(p)}}))};
+EditorUi.prototype.getLinkForPage=function(b,d,g){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var l=this.getCurrentFile();if(null!=l&&l.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var D=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages sketch".split(" "));D+=(0==D.length?"?":"&")+"page-id="+b.getId();null!=d&&(D+="&"+d.join("&"));return(g&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
+EditorUi.drawHost:"https://"+window.location.host)+"/"+D+"#"+l.getHash()}}return null};
+EditorUi.prototype.createPageMenu=function(b,d){return mxUtils.bind(this,function(g,l){var D=this.editor.graph;g.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),l);g.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),l);g.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,d)}),l);null!=this.getLinkForPage(b)&&(g.addSeparator(l),g.addItem(mxResources.get("link"),
+null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(p,E,N,R,G,M){p=this.createUrlParameters(p,E,N,R,G,M);N||p.push("hide-pages=1");D.isSelectionEmpty()||(N=D.getBoundingBox(D.getSelectionCells()),E=D.view.translate,G=D.view.scale,N.width/=G,N.height/=G,N.x=N.x/G-E.x,N.y=N.y/G-E.y,p.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(N.x),y:Math.round(N.y),width:Math.round(N.width),height:Math.round(N.height),border:100}))));
+R=new EmbedDialog(this,this.getLinkForPage(b,p,R));this.showDialog(R.container,450,240,!0,!0);R.init()}))})));g.addSeparator(l);g.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),l);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(g.addSeparator(l),g.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,
+!0,!0))}),l))})};(function(){var b=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(){b.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(d,g,l){l.ui=d.ui;return g};b.afterDecode=function(d,g,l){d=l.oldIndex;l.oldIndex=l.newIndex;l.newIndex=d;return l};mxCodecRegistry.register(b)})();
+(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(d,g,l){l.ui=d.ui;return g};b.afterDecode=function(d,g,l){d=l.previous;l.previous=l.name;l.name=d;return l};mxCodecRegistry.register(b)})();
+(function(){var b=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" "));b.afterEncode=function(d,g,l){l.setAttribute("relatedPage",g.relatedPage.getId());null==g.index&&(l.setAttribute("name",g.relatedPage.getName()),null!=g.relatedPage.viewState&&l.setAttribute("viewState",JSON.stringify(g.relatedPage.viewState,function(D,p){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,D)?p:void 0})),null!=g.relatedPage.root&&d.encodeCell(g.relatedPage.root,
+l));return l};b.beforeDecode=function(d,g,l){l.ui=d.ui;l.relatedPage=l.ui.getPageById(g.getAttribute("relatedPage"));if(null==l.relatedPage){var D=g.ownerDocument.createElement("diagram");D.setAttribute("id",g.getAttribute("relatedPage"));D.setAttribute("name",g.getAttribute("name"));l.relatedPage=new DiagramPage(D);D=g.getAttribute("viewState");null!=D&&(l.relatedPage.viewState=JSON.parse(D),g.removeAttribute("viewState"));g=g.cloneNode(!0);D=g.firstChild;if(null!=D)for(l.relatedPage.root=d.decodeCell(D,
+!1),l=D.nextSibling,D.parentNode.removeChild(D),D=l;null!=D;){l=D.nextSibling;if(D.nodeType==mxConstants.NODETYPE_ELEMENT){var p=D.getAttribute("id");null==d.lookup(p)&&d.decodeCell(D)}D.parentNode.removeChild(D);D=l}}return g};b.afterDecode=function(d,g,l){l.index=l.previousIndex;return l};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(l,D,p,E,N){D=null!=D?D:!1;null==p&&(p=this.getFoldableCells(this.getSelectionCells(),l));this.stopEditing();this.model.beginUpdate();try{for(var R=p.slice(),G=0;G<p.length;G++)"1"==mxUtils.getValue(this.getCurrentCellStyle(p[G]),"treeFolding","0")&&this.foldTreeCell(l,p[G]);p=R;p=b.apply(this,arguments)}finally{this.model.endUpdate()}return p};Graph.prototype.foldTreeCell=
+function(l,D){this.model.beginUpdate();try{var p=[];this.traverse(D,!0,mxUtils.bind(this,function(N,R){var G=null!=R&&this.isTreeEdge(R);G&&p.push(R);N==D||null!=R&&!G||p.push(N);return(null==R||G)&&(N==D||!this.model.isCollapsed(N))}));this.model.setCollapsed(D,l);for(var E=0;E<p.length;E++)this.model.setVisible(p[E],!l)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(l){return!this.isEdgeIgnored(l)};Graph.prototype.getTreeEdges=function(l,D,p,E,N,R){return this.model.filterCells(this.getEdges(l,
+D,p,E,N,R),mxUtils.bind(this,function(G){return this.isTreeEdge(G)}))};Graph.prototype.getIncomingTreeEdges=function(l,D){return this.getTreeEdges(l,D,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(l,D){return this.getTreeEdges(l,D,!1,!0,!1)};var d=EditorUi.prototype.init;EditorUi.prototype.init=function(){d.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function l(L){return z.isVertex(L)&&p(L)}function D(L){var V=
+!1;null!=L&&(V="1"==k.getCurrentCellStyle(L).treeMoving);return V}function p(L){var V=!1;null!=L&&(L=z.getParent(L),V=k.view.getState(L),V="tree"==(null!=V?V.style:k.getCellStyle(L)).containerType);return V}function E(L){var V=!1;null!=L&&(L=z.getParent(L),V=k.view.getState(L),k.view.getState(L),V=null!=(null!=V?V.style:k.getCellStyle(L)).childLayout);return V}function N(L){L=k.view.getState(L);if(null!=L){var V=k.getIncomingTreeEdges(L.cell);if(0<V.length&&(V=k.view.getState(V[0]),null!=V&&(V=V.absolutePoints,
+null!=V&&0<V.length&&(V=V[V.length-1],null!=V)))){if(V.y==L.y&&Math.abs(V.x-L.getCenterX())<L.width/2)return mxConstants.DIRECTION_SOUTH;if(V.y==L.y+L.height&&Math.abs(V.x-L.getCenterX())<L.width/2)return mxConstants.DIRECTION_NORTH;if(V.x>L.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function R(L,V){V=null!=V?V:!0;k.model.beginUpdate();try{var T=k.model.getParent(L),Y=k.getIncomingTreeEdges(L),W=k.cloneCells([Y[0],L]);k.model.setTerminal(W[0],k.model.getTerminal(Y[0],
+!0),!0);var ka=N(L),q=T.geometry;ka==mxConstants.DIRECTION_SOUTH||ka==mxConstants.DIRECTION_NORTH?W[1].geometry.x+=V?L.geometry.width+10:-W[1].geometry.width-10:W[1].geometry.y+=V?L.geometry.height+10:-W[1].geometry.height-10;k.view.currentRoot!=T&&(W[1].geometry.x-=q.x,W[1].geometry.y-=q.y);var F=k.view.getState(L),S=k.view.scale;if(null!=F){var ba=mxRectangle.fromRectangle(F);ka==mxConstants.DIRECTION_SOUTH||ka==mxConstants.DIRECTION_NORTH?ba.x+=(V?L.geometry.width+10:-W[1].geometry.width-10)*S:
+ba.y+=(V?L.geometry.height+10:-W[1].geometry.height-10)*S;var U=k.getOutgoingTreeEdges(k.model.getTerminal(Y[0],!0));if(null!=U){for(var ca=ka==mxConstants.DIRECTION_SOUTH||ka==mxConstants.DIRECTION_NORTH,ea=q=Y=0;ea<U.length;ea++){var na=k.model.getTerminal(U[ea],!1);if(ka==N(na)){var ra=k.view.getState(na);na!=L&&null!=ra&&(ca&&V!=ra.getCenterX()<F.getCenterX()||!ca&&V!=ra.getCenterY()<F.getCenterY())&&mxUtils.intersects(ba,ra)&&(Y=10+Math.max(Y,(Math.min(ba.x+ba.width,ra.x+ra.width)-Math.max(ba.x,
+ra.x))/S),q=10+Math.max(q,(Math.min(ba.y+ba.height,ra.y+ra.height)-Math.max(ba.y,ra.y))/S))}}ca?q=0:Y=0;for(ea=0;ea<U.length;ea++)if(na=k.model.getTerminal(U[ea],!1),ka==N(na)&&(ra=k.view.getState(na),na!=L&&null!=ra&&(ca&&V!=ra.getCenterX()<F.getCenterX()||!ca&&V!=ra.getCenterY()<F.getCenterY()))){var ya=[];k.traverse(ra.cell,!0,function(va,Da){var pa=null!=Da&&k.isTreeEdge(Da);pa&&ya.push(Da);(null==Da||pa)&&ya.push(va);return null==Da||pa});k.moveCells(ya,(V?1:-1)*Y,(V?1:-1)*q)}}}return k.addCells(W,
+T)}finally{k.model.endUpdate()}}function G(L){k.model.beginUpdate();try{var V=N(L),T=k.getIncomingTreeEdges(L),Y=k.cloneCells([T[0],L]);k.model.setTerminal(T[0],Y[1],!1);k.model.setTerminal(Y[0],Y[1],!0);k.model.setTerminal(Y[0],L,!1);var W=k.model.getParent(L),ka=W.geometry,q=[];k.view.currentRoot!=W&&(Y[1].geometry.x-=ka.x,Y[1].geometry.y-=ka.y);k.traverse(L,!0,function(ba,U){var ca=null!=U&&k.isTreeEdge(U);ca&&q.push(U);(null==U||ca)&&q.push(ba);return null==U||ca});var F=L.geometry.width+40,S=
+L.geometry.height+40;V==mxConstants.DIRECTION_SOUTH?F=0:V==mxConstants.DIRECTION_NORTH?(F=0,S=-S):V==mxConstants.DIRECTION_WEST?(F=-F,S=0):V==mxConstants.DIRECTION_EAST&&(S=0);k.moveCells(q,F,S);return k.addCells(Y,W)}finally{k.model.endUpdate()}}function M(L,V){k.model.beginUpdate();try{var T=k.model.getParent(L),Y=k.getIncomingTreeEdges(L),W=N(L);0==Y.length&&(Y=[k.createEdge(T,null,"",null,null,k.createCurrentEdgeStyle())],W=V);var ka=k.cloneCells([Y[0],L]);k.model.setTerminal(ka[0],L,!0);if(null==
+k.model.getTerminal(ka[0],!1)){k.model.setTerminal(ka[0],ka[1],!1);var q=k.getCellStyle(ka[1]).newEdgeStyle;if(null!=q)try{var F=JSON.parse(q),S;for(S in F)k.setCellStyles(S,F[S],[ka[0]]),"edgeStyle"==S&&"elbowEdgeStyle"==F[S]&&k.setCellStyles("elbow",W==mxConstants.DIRECTION_SOUTH||W==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[ka[0]])}catch(ra){}}Y=k.getOutgoingTreeEdges(L);var ba=T.geometry;V=[];k.view.currentRoot==T&&(ba=new mxRectangle);for(q=0;q<Y.length;q++){var U=k.model.getTerminal(Y[q],
+!1);null!=U&&V.push(U)}var ca=k.view.getBounds(V),ea=k.view.translate,na=k.view.scale;W==mxConstants.DIRECTION_SOUTH?(ka[1].geometry.x=null==ca?L.geometry.x+(L.geometry.width-ka[1].geometry.width)/2:(ca.x+ca.width)/na-ea.x-ba.x+10,ka[1].geometry.y+=ka[1].geometry.height-ba.y+40):W==mxConstants.DIRECTION_NORTH?(ka[1].geometry.x=null==ca?L.geometry.x+(L.geometry.width-ka[1].geometry.width)/2:(ca.x+ca.width)/na-ea.x+-ba.x+10,ka[1].geometry.y-=ka[1].geometry.height+ba.y+40):(ka[1].geometry.x=W==mxConstants.DIRECTION_WEST?
+ka[1].geometry.x-(ka[1].geometry.width+ba.x+40):ka[1].geometry.x+(ka[1].geometry.width-ba.x+40),ka[1].geometry.y=null==ca?L.geometry.y+(L.geometry.height-ka[1].geometry.height)/2:(ca.y+ca.height)/na-ea.y+-ba.y+10);return k.addCells(ka,T)}finally{k.model.endUpdate()}}function Q(L,V,T){L=k.getOutgoingTreeEdges(L);T=k.view.getState(T);var Y=[];if(null!=T&&null!=L){for(var W=0;W<L.length;W++){var ka=k.view.getState(k.model.getTerminal(L[W],!1));null!=ka&&(!V&&Math.min(ka.x+ka.width,T.x+T.width)>=Math.max(ka.x,
+T.x)||V&&Math.min(ka.y+ka.height,T.y+T.height)>=Math.max(ka.y,T.y))&&Y.push(ka)}Y.sort(function(q,F){return V?q.x+q.width-F.x-F.width:q.y+q.height-F.y-F.height})}return Y}function e(L,V){var T=N(L),Y=V==mxConstants.DIRECTION_EAST||V==mxConstants.DIRECTION_WEST;(T==mxConstants.DIRECTION_EAST||T==mxConstants.DIRECTION_WEST)==Y&&T!=V?f.actions.get("selectParent").funct():T==V?(V=k.getOutgoingTreeEdges(L),null!=V&&0<V.length&&k.setSelectionCell(k.model.getTerminal(V[0],!1))):(T=k.getIncomingTreeEdges(L),
+null!=T&&0<T.length&&(Y=Q(k.model.getTerminal(T[0],!0),Y,L),L=k.view.getState(L),null!=L&&(L=mxUtils.indexOf(Y,L),0<=L&&(L+=V==mxConstants.DIRECTION_NORTH||V==mxConstants.DIRECTION_WEST?-1:1,0<=L&&L<=Y.length-1&&k.setSelectionCell(Y[L].cell)))))}var f=this,k=f.editor.graph,z=k.getModel(),t=f.menus.createPopupMenu;f.menus.createPopupMenu=function(L,V,T){t.apply(this,arguments);if(1==k.getSelectionCount()){V=k.getSelectionCell();var Y=k.getOutgoingTreeEdges(V);L.addSeparator();0<Y.length&&(l(k.getSelectionCell())&&
+this.addMenuItems(L,["selectChildren"],null,T),this.addMenuItems(L,["selectDescendants"],null,T));l(k.getSelectionCell())?(L.addSeparator(),0<k.getIncomingTreeEdges(V).length&&this.addMenuItems(L,["selectSiblings","selectParent"],null,T)):0<k.model.getEdgeCount(V)&&this.addMenuItems(L,["selectConnections"],null,T)}};f.actions.addAction("selectChildren",function(){if(k.isEnabled()&&1==k.getSelectionCount()){var L=k.getSelectionCell();L=k.getOutgoingTreeEdges(L);if(null!=L){for(var V=[],T=0;T<L.length;T++)V.push(k.model.getTerminal(L[T],
+!1));k.setSelectionCells(V)}}},null,null,"Alt+Shift+X");f.actions.addAction("selectSiblings",function(){if(k.isEnabled()&&1==k.getSelectionCount()){var L=k.getSelectionCell();L=k.getIncomingTreeEdges(L);if(null!=L&&0<L.length&&(L=k.getOutgoingTreeEdges(k.model.getTerminal(L[0],!0)),null!=L)){for(var V=[],T=0;T<L.length;T++)V.push(k.model.getTerminal(L[T],!1));k.setSelectionCells(V)}}},null,null,"Alt+Shift+S");f.actions.addAction("selectParent",function(){if(k.isEnabled()&&1==k.getSelectionCount()){var L=
+k.getSelectionCell();L=k.getIncomingTreeEdges(L);null!=L&&0<L.length&&k.setSelectionCell(k.model.getTerminal(L[0],!0))}},null,null,"Alt+Shift+P");f.actions.addAction("selectDescendants",function(L,V){L=k.getSelectionCell();if(k.isEnabled()&&k.model.isVertex(L)){if(null!=V&&mxEvent.isAltDown(V))k.setSelectionCells(k.model.getTreeEdges(L,null==V||!mxEvent.isShiftDown(V),null==V||!mxEvent.isControlDown(V)));else{var T=[];k.traverse(L,!0,function(Y,W){var ka=null!=W&&k.isTreeEdge(W);ka&&T.push(W);null!=
+W&&!ka||null!=V&&mxEvent.isShiftDown(V)||T.push(Y);return null==W||ka})}k.setSelectionCells(T)}},null,null,"Alt+Shift+D");var B=k.removeCells;k.removeCells=function(L,V){V=null!=V?V:!0;null==L&&(L=this.getDeletableCells(this.getSelectionCells()));V&&(L=this.getDeletableCells(this.addAllEdges(L)));for(var T=[],Y=0;Y<L.length;Y++){var W=L[Y];z.isEdge(W)&&p(W)&&(T.push(W),W=z.getTerminal(W,!1));if(l(W)){var ka=[];k.traverse(W,!0,function(q,F){var S=null!=F&&k.isTreeEdge(F);S&&ka.push(F);(null==F||S)&&
+ka.push(q);return null==F||S});0<ka.length&&(T=T.concat(ka),W=k.getIncomingTreeEdges(L[Y]),L=L.concat(W))}else null!=W&&T.push(L[Y])}L=T;return B.apply(this,arguments)};f.hoverIcons.getStateAt=function(L,V,T){return l(L.cell)?null:this.graph.view.getState(this.graph.getCellAt(V,T))};var I=k.duplicateCells;k.duplicateCells=function(L,V){L=null!=L?L:this.getSelectionCells();for(var T=L.slice(0),Y=0;Y<T.length;Y++){var W=k.view.getState(T[Y]);if(null!=W&&l(W.cell)){var ka=k.getIncomingTreeEdges(W.cell);
+for(W=0;W<ka.length;W++)mxUtils.remove(ka[W],L)}}this.model.beginUpdate();try{var q=I.call(this,L,V);if(q.length==L.length)for(Y=0;Y<L.length;Y++)if(l(L[Y])){var F=k.getIncomingTreeEdges(q[Y]);ka=k.getIncomingTreeEdges(L[Y]);if(0==F.length&&0<ka.length){var S=this.cloneCell(ka[0]);this.addEdge(S,k.getDefaultParent(),this.model.getTerminal(ka[0],!0),q[Y])}}}finally{this.model.endUpdate()}return q};var O=k.moveCells;k.moveCells=function(L,V,T,Y,W,ka,q){var F=null;this.model.beginUpdate();try{var S=
+W,ba=this.getCurrentCellStyle(W);if(null!=L&&l(W)&&"1"==mxUtils.getValue(ba,"treeFolding","0")){for(var U=0;U<L.length;U++)if(l(L[U])||k.model.isEdge(L[U])&&null==k.model.getTerminal(L[U],!0)){W=k.model.getParent(L[U]);break}if(null!=S&&W!=S&&null!=this.view.getState(L[0])){var ca=k.getIncomingTreeEdges(L[0]);if(0<ca.length){var ea=k.view.getState(k.model.getTerminal(ca[0],!0));if(null!=ea){var na=k.view.getState(S);null!=na&&(V=(na.getCenterX()-ea.getCenterX())/k.view.scale,T=(na.getCenterY()-ea.getCenterY())/
+k.view.scale)}}}}F=O.apply(this,arguments);if(null!=F&&null!=L&&F.length==L.length)for(U=0;U<F.length;U++)if(this.model.isEdge(F[U]))l(S)&&0>mxUtils.indexOf(F,this.model.getTerminal(F[U],!0))&&this.model.setTerminal(F[U],S,!0);else if(l(L[U])&&(ca=k.getIncomingTreeEdges(L[U]),0<ca.length))if(!Y)l(S)&&0>mxUtils.indexOf(L,this.model.getTerminal(ca[0],!0))&&this.model.setTerminal(ca[0],S,!0);else if(0==k.getIncomingTreeEdges(F[U]).length){ba=S;if(null==ba||ba==k.model.getParent(L[U]))ba=k.model.getTerminal(ca[0],
+!0);Y=this.cloneCell(ca[0]);this.addEdge(Y,k.getDefaultParent(),ba,F[U])}}finally{this.model.endUpdate()}return F};if(null!=f.sidebar){var J=f.sidebar.dropAndConnect;f.sidebar.dropAndConnect=function(L,V,T,Y){var W=k.model,ka=null;W.beginUpdate();try{if(ka=J.apply(this,arguments),l(L))for(var q=0;q<ka.length;q++)if(W.isEdge(ka[q])&&null==W.getTerminal(ka[q],!0)){W.setTerminal(ka[q],L,!0);var F=k.getCellGeometry(ka[q]);F.points=null;null!=F.getTerminalPoint(!0)&&F.setTerminalPoint(null,!0)}}finally{W.endUpdate()}return ka}}var y=
+{88:f.actions.get("selectChildren"),84:f.actions.get("selectSubtree"),80:f.actions.get("selectParent"),83:f.actions.get("selectSiblings")},ia=f.onKeyDown;f.onKeyDown=function(L){try{if(k.isEnabled()&&!k.isEditing()&&l(k.getSelectionCell())&&1==k.getSelectionCount()){var V=null;0<k.getIncomingTreeEdges(k.getSelectionCell()).length&&(9==L.which?V=mxEvent.isShiftDown(L)?G(k.getSelectionCell()):M(k.getSelectionCell()):13==L.which&&(V=R(k.getSelectionCell(),!mxEvent.isShiftDown(L))));if(null!=V&&0<V.length)1==
+V.length&&k.model.isEdge(V[0])?k.setSelectionCell(k.model.getTerminal(V[0],!1)):k.setSelectionCell(V[V.length-1]),null!=f.hoverIcons&&f.hoverIcons.update(k.view.getState(k.getSelectionCell())),k.startEditingAtCell(k.getSelectionCell()),mxEvent.consume(L);else if(mxEvent.isAltDown(L)&&mxEvent.isShiftDown(L)){var T=y[L.keyCode];null!=T&&(T.funct(L),mxEvent.consume(L))}else 37==L.keyCode?(e(k.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(L)):38==L.keyCode?(e(k.getSelectionCell(),mxConstants.DIRECTION_NORTH),
+mxEvent.consume(L)):39==L.keyCode?(e(k.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(L)):40==L.keyCode&&(e(k.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(L))}}catch(Y){f.handleError(Y)}mxEvent.isConsumed(L)||ia.apply(this,arguments)};var da=k.connectVertex;k.connectVertex=function(L,V,T,Y,W,ka,q){var F=k.getIncomingTreeEdges(L);if(l(L)){var S=N(L),ba=S==mxConstants.DIRECTION_EAST||S==mxConstants.DIRECTION_WEST,U=V==mxConstants.DIRECTION_EAST||V==mxConstants.DIRECTION_WEST;
+return S==V||0==F.length?M(L,V):ba==U?G(L):R(L,V!=mxConstants.DIRECTION_NORTH&&V!=mxConstants.DIRECTION_WEST)}return da.apply(this,arguments)};k.getSubtree=function(L){var V=[L];!D(L)&&!l(L)||E(L)||k.traverse(L,!0,function(T,Y){var W=null!=Y&&k.isTreeEdge(Y);W&&0>mxUtils.indexOf(V,Y)&&V.push(Y);(null==Y||W)&&0>mxUtils.indexOf(V,T)&&V.push(T);return null==Y||W});return V};var ja=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){ja.apply(this,arguments);(D(this.state.cell)||l(this.state.cell))&&
+!E(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(L){this.graph.graphHandler.start(this.state.cell,
+mxEvent.getClientX(L),mxEvent.getClientY(L),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(L);this.graph.isMouseDown=!0;f.hoverIcons.reset();mxEvent.consume(L)})))};var aa=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){aa.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=
+this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var qa=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(L){qa.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=L?"":"none")};var sa=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(L,V){sa.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 l=g.apply(this,arguments),D=this.graph;return l.concat([this.addEntry("tree container",function(){var p=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");p.vertex=!0;var E=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
+E.vertex=!0;var N=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');N.vertex=!0;var R=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");R.geometry.relative=!0;R.edge=!0;E.insertEdge(R,!0);N.insertEdge(R,!1);p.insert(R);p.insert(E);p.insert(N);return sb.createVertexTemplateFromCells([p],p.geometry.width,
+p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var p=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");p.vertex=!0;var E=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');E.vertex=!0;var N=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};');N.vertex=!0;var R=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");R.geometry.relative=!0;R.edge=!0;E.insertEdge(R,!0);N.insertEdge(R,!1);
+var G=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};');G.vertex=!0;var M=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+M.geometry.relative=!0;M.edge=!0;E.insertEdge(M,!0);G.insertEdge(M,!1);var Q=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');Q.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+e.geometry.relative=!0;e.edge=!0;E.insertEdge(e,!0);Q.insertEdge(e,!1);var f=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');f.vertex=!0;var k=new mxCell("",new mxGeometry(0,
+0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");k.geometry.relative=!0;k.edge=!0;E.insertEdge(k,!0);f.insertEdge(k,!1);p.insert(R);p.insert(M);p.insert(e);p.insert(k);p.insert(E);p.insert(N);p.insert(G);p.insert(Q);p.insert(f);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var p=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');
p.vertex=!0;return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var p=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-p.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");F.geometry.setTerminalPoint(new mxPoint(-40,40),!0);F.geometry.relative=!0;F.edge=!0;p.insertEdge(F,!1);return sb.createVertexTemplateFromCells([p,F],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var p=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-p.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");F.geometry.setTerminalPoint(new mxPoint(-40,40),!0);F.geometry.relative=!0;F.edge=!0;p.insertEdge(F,!1);return sb.createVertexTemplateFromCells([p,F],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 F=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');C.setAttributeForCell(F,"treeRoot","1");F.vertex=!0;var L=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"};');
-L.vertex=!0;var P=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");P.geometry.relative=!0;P.edge=!0;F.insertEdge(P,!0);L.insertEdge(P,!1);var d=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"};');d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
-f.geometry.relative=!0;f.edge=!0;F.insertEdge(f,!0);d.insertEdge(f,!1);p.insert(P);p.insert(f);p.insert(F);p.insert(L);p.insert(d);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree root",function(){var p=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');C.setAttributeForCell(p,"treeRoot",
-"1");p.vertex=!0;return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree division",function(){var p=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');p.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
-F.geometry.setTerminalPoint(new mxPoint(0,0),!0);F.geometry.relative=!0;F.edge=!0;p.insertEdge(F,!1);return sb.createVertexTemplateFromCells([p,F],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 F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
-F.geometry.setTerminalPoint(new mxPoint(110,-40),!0);F.geometry.relative=!0;F.edge=!0;p.insertEdge(F,!1);var L=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");L.vertex=!0;var P=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");P.geometry.setTerminalPoint(new mxPoint(110,-40),!0);P.geometry.relative=
-!0;P.edge=!0;L.insertEdge(P,!1);return sb.createVertexTemplateFromCells([F,P,p,L],220,60,"Sub Sections")})])}}})();EditorUi.windowed="0"!=urlParams.windows;
-EditorUi.initMinimalTheme=function(){function b(D,I){if(EditorUi.windowed){var H=D.editor.graph;H.popupMenuHandler.hideMenu();if(null==D.formatWindow){I="1"==urlParams.sketch?Math.max(10,D.diagramContainer.clientWidth-241):Math.max(10,D.diagramContainer.clientWidth-248);var S="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;H="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,H.container.clientHeight-10);D.formatWindow=new WrapperWindow(D,mxResources.get("format"),I,S,240,H,
-function(T){D.createFormat(T).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)}else D.formatWindow.window.setVisible(null!=I?I:!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.borderLeft="1px solid gray",
-D.formatElt.style.right="0px"),H=D.diagramContainer.parentNode,null!=D.formatElt.parentNode?(D.formatElt.parentNode.removeChild(D.formatElt),H.style.right="0px"):(H.parentNode.appendChild(D.formatElt),H.style.right=D.formatElt.style.width)}function e(D,I){function H(fa,la){var ra=D.menus.get(fa);fa=M.addMenu(la,mxUtils.bind(this,function(){ra.funct.apply(this,arguments)}));fa.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";
-fa.className="geTitle";I.appendChild(fa);return fa}var S=document.createElement("div");S.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";S.className="geTitle";var T=document.createElement("span");T.style.fontSize="18px";T.style.marginRight="5px";T.innerHTML="+";S.appendChild(T);mxUtils.write(S,mxResources.get("moreShapes"));I.appendChild(S);mxEvent.addListener(S,"click",function(){D.actions.get("shapes").funct()});
-var M=new Menubar(D,I);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?S.style.bottom="0":null!=D.actions.get("newLibrary")?(S=document.createElement("div"),S.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",S.className="geTitle",T=document.createElement("span"),T.style.cssText="position:relative;top:6px;",mxUtils.write(T,mxResources.get("newLibrary")),S.appendChild(T),
-I.appendChild(S),mxEvent.addListener(S,"click",D.actions.get("newLibrary").funct),S=document.createElement("div"),S.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;",S.className="geTitle",T=document.createElement("span"),T.style.cssText="position:relative;top:6px;",mxUtils.write(T,mxResources.get("openLibrary")),S.appendChild(T),I.appendChild(S),mxEvent.addListener(S,
-"click",D.actions.get("openLibrary").funct)):(S=H("newLibrary",mxResources.get("newLibrary")),S.style.boxSizing="border-box",S.style.paddingRight="6px",S.style.paddingLeft="6px",S.style.height="32px",S.style.left="0",S=H("openLibraryFrom",mxResources.get("openLibraryFrom")),S.style.borderLeft="1px solid lightgray",S.style.boxSizing="border-box",S.style.paddingRight="6px",S.style.paddingLeft="6px",S.style.height="32px",S.style.left="50%");I.appendChild(D.sidebar.container);I.style.overflow="hidden"}
-function k(D,I){if(EditorUi.windowed){var H=D.editor.graph;H.popupMenuHandler.hideMenu();if(null==D.sidebarWindow){I=Math.min(H.container.clientWidth-10,218);var S="1"==urlParams.embedInline?650:Math.min(H.container.clientHeight-40,650);D.sidebarWindow=new WrapperWindow(D,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&"1"!=urlParams.embedInline?Math.max(30,(H.container.clientHeight-S)/2):56,I-6,S-6,function(T){e(D,T)});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(T){D.sidebar.showEntries(T,null,!0)});D.restoreLibraries()}else D.sidebarWindow.window.setVisible(null!=I?I:!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"),H=D.diagramContainer.parentNode,null!=D.sidebarElt.parentNode?(D.sidebarElt.parentNode.removeChild(D.sidebarElt),H.style.left="0px"):(H.parentNode.appendChild(D.sidebarElt),H.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 m=0;try{m=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(D){}Editor.checkmarkImage=
+p.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");E.geometry.setTerminalPoint(new mxPoint(-40,40),!0);E.geometry.relative=!0;E.edge=!0;p.insertEdge(E,!1);return sb.createVertexTemplateFromCells([p,E],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var p=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+p.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");E.geometry.setTerminalPoint(new mxPoint(-40,40),!0);E.geometry.relative=!0;E.edge=!0;p.insertEdge(E,!1);return sb.createVertexTemplateFromCells([p,E],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree orgchart organization division",function(){var p=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
+p.vertex=!0;var E=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');D.setAttributeForCell(E,"treeRoot","1");E.vertex=!0;var N=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"};');
+N.vertex=!0;var R=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");R.geometry.relative=!0;R.edge=!0;E.insertEdge(R,!0);N.insertEdge(R,!1);var G=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"};');G.vertex=!0;var M=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
+M.geometry.relative=!0;M.edge=!0;E.insertEdge(M,!0);G.insertEdge(M,!1);p.insert(R);p.insert(M);p.insert(E);p.insert(N);p.insert(G);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree root",function(){var p=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');D.setAttributeForCell(p,"treeRoot",
+"1");p.vertex=!0;return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree division",function(){var p=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');p.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
+E.geometry.setTerminalPoint(new mxPoint(0,0),!0);E.geometry.relative=!0;E.edge=!0;p.insertEdge(E,!1);return sb.createVertexTemplateFromCells([p,E],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree sub sections",function(){var p=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");p.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
+E.geometry.setTerminalPoint(new mxPoint(110,-40),!0);E.geometry.relative=!0;E.edge=!0;p.insertEdge(E,!1);var N=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");N.vertex=!0;var R=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");R.geometry.setTerminalPoint(new mxPoint(110,-40),!0);R.geometry.relative=
+!0;R.edge=!0;N.insertEdge(R,!1);return sb.createVertexTemplateFromCells([E,R,p,N],220,60,"Sub Sections")})])}}})();"1"==urlParams["live-ui"]&&"min"==uiTheme&&"1"==urlParams.sketch&&(Editor.currentTheme="sketch",uiTheme="kennedy");EditorUi.windowed="0"!=urlParams.windows;
+EditorUi.initMinimalTheme=function(){function b(t,B){if(EditorUi.windowed){var I=t.editor.graph;I.popupMenuHandler.hideMenu();if(null==t.formatWindow){B="1"==urlParams.sketch?Math.max(10,t.diagramContainer.clientWidth-244):Math.max(10,t.diagramContainer.clientWidth-248);var O="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;I="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,I.container.clientHeight-10);t.formatWindow=new WrapperWindow(t,mxResources.get("format"),B,O,240,I,
+function(J){t.createFormat(J).init()});t.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){t.formatWindow.window.fit()}));t.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else t.formatWindow.window.setVisible(null!=B?B:!t.formatWindow.window.isVisible())}else null==t.formatElt&&(t.formatElt=t.createSidebarContainer(),t.createFormat(t.formatElt).init(),t.formatElt.style.border="none",t.formatElt.style.width="240px",t.formatElt.style.borderLeft="1px solid gray",
+t.formatElt.style.right="0px"),I=t.diagramContainer.parentNode,null!=t.formatElt.parentNode?(t.formatElt.parentNode.removeChild(t.formatElt),I.style.right="0px"):(I.parentNode.appendChild(t.formatElt),I.style.right=t.formatElt.style.width)}function d(t,B){function I(ia,da){var ja=t.menus.get(ia);ia=y.addMenu(da,mxUtils.bind(this,function(){ja.funct.apply(this,arguments)}));ia.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";
+ia.className="geTitle";B.appendChild(ia);return ia}var O=document.createElement("div");O.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";O.className="geTitle";var J=document.createElement("span");J.style.fontSize="18px";J.style.marginRight="5px";J.innerHTML="+";O.appendChild(J);mxUtils.write(O,mxResources.get("moreShapes"));B.appendChild(O);mxEvent.addListener(O,"click",function(){t.actions.get("shapes").funct()});
+var y=new Menubar(t,B);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?O.style.bottom="0":null!=t.actions.get("newLibrary")?(O=document.createElement("div"),O.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",O.className="geTitle",J=document.createElement("span"),J.style.cssText="position:relative;top:6px;",mxUtils.write(J,mxResources.get("newLibrary")),O.appendChild(J),
+B.appendChild(O),mxEvent.addListener(O,"click",t.actions.get("newLibrary").funct),O=document.createElement("div"),O.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;",O.className="geTitle",J=document.createElement("span"),J.style.cssText="position:relative;top:6px;",mxUtils.write(J,mxResources.get("openLibrary")),O.appendChild(J),B.appendChild(O),mxEvent.addListener(O,
+"click",t.actions.get("openLibrary").funct)):(O=I("newLibrary",mxResources.get("newLibrary")),O.style.boxSizing="border-box",O.style.paddingRight="6px",O.style.paddingLeft="6px",O.style.height="32px",O.style.left="0",O=I("openLibraryFrom",mxResources.get("openLibraryFrom")),O.style.borderLeft="1px solid lightgray",O.style.boxSizing="border-box",O.style.paddingRight="6px",O.style.paddingLeft="6px",O.style.height="32px",O.style.left="50%");B.appendChild(t.sidebar.container);B.style.overflow="hidden"}
+function g(t,B){if(EditorUi.windowed){var I=t.editor.graph;I.popupMenuHandler.hideMenu();if(null==t.sidebarWindow){B=Math.min(I.container.clientWidth-10,218);var O="1"==urlParams.embedInline?650:Math.min(I.container.clientHeight-40,650);t.sidebarWindow=new WrapperWindow(t,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&"1"!=urlParams.embedInline?Math.max(30,(I.container.clientHeight-O)/2):56,B-6,O-6,function(J){d(t,J)});t.sidebarWindow.window.addListener(mxEvent.SHOW,
+mxUtils.bind(this,function(){t.sidebarWindow.window.fit()}));t.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);t.sidebarWindow.window.setVisible(!0);isLocalStorage&&t.getLocalData("sidebar",function(J){t.sidebar.showEntries(J,null,!0)});t.restoreLibraries()}else t.sidebarWindow.window.setVisible(null!=B?B:!t.sidebarWindow.window.isVisible())}else null==t.sidebarElt&&(t.sidebarElt=t.createSidebarContainer(),d(t,t.sidebarElt),t.sidebarElt.style.border="none",t.sidebarElt.style.width="210px",
+t.sidebarElt.style.borderRight="1px solid gray"),I=t.diagramContainer.parentNode,null!=t.sidebarElt.parentNode?(t.sidebarElt.parentNode.removeChild(t.sidebarElt),I.style.left="0px"):(I.parentNode.appendChild(t.sidebarElt),I.style.left=t.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var l=0;try{l=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(t){}Editor.checkmarkImage=
Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;
mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR=
"#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=35;mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";Format.inactiveTabBackgroundColor="#f0f0f0";mxGraphHandler.prototype.previewColor=
"#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight="1"==urlParams.sketch?1:46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert="1"!=urlParams.sketch&&!mxClient.IS_IOS&&!mxClient.IS_ANDROID;Editor.styleElt=document.createElement("style");Editor.styleElt.type="text/css";Editor.styleElt.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(Editor.styleElt);
-Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var C=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");C.apply(this,arguments)};var p=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){p.apply(this,arguments);this.menus.get("save").setEnabled(null!=
-this.getCurrentFile()||"1"==urlParams.embed)};var F=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(D,I){null!=I.shortcut&&900>m&&!mxClient.IS_IOS?D.firstChild.nextSibling.setAttribute("title",I.shortcut):F.apply(this,arguments)};var L=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){L.apply(this,arguments);if(null!=this.userElement){var D=this.userElement;D.style.cssText="position:relative;cursor:pointer;display:"+D.style.display;D.className="geToolbarButton";
-D.innerText="";D.style.backgroundImage="url("+Editor.userImage+")";D.style.backgroundPosition="center center";D.style.backgroundRepeat="no-repeat";D.style.backgroundSize="24px 24px";D.style.height="24px";D.style.width="24px";var I=mxResources.get("changeUser");if("none"!=D.style.display){D.style.display="inline-block";var H=this.getCurrentFile();if(null!=H&&H.isRealtimeEnabled()&&H.isRealtimeSupported()){var S=document.createElement("img");S.setAttribute("border","0");S.style.position="absolute";
-S.style.left="18px";S.style.top="2px";S.style.width="12px";S.style.height="12px";var T=H.getRealtimeError();H=H.getRealtimeState();I+=" ("+mxResources.get("realtimeCollaboration")+": ";1==H?(S.src=Editor.syncImage,I+=mxResources.get("online")):(S.src=Editor.syncProblemImage,I=null!=T&&null!=T.message?I+T.message:I+mxResources.get("disconnected"));D.style.marginRight="6px";D.appendChild(S);I+=")"}}D.setAttribute("title",I)}};var P=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=
-function(){P.apply(this,arguments);null!=this.shareButton&&(this.shareButton.style.display="none")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var D=document.createElement("div");D.style.display="inline-block";D.style.position="relative";D.style.marginTop="6px";D.style.marginRight="4px";var I=document.createElement("a");I.className="geMenuItem gePrimaryBtn";I.style.marginLeft="8px";I.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!=
-urlParams.saveAndExit){var H="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(I,H);I.setAttribute("title",H);mxEvent.addListener(I,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));D.appendChild(I)}}else mxUtils.write(I,mxResources.get("save")),I.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(I,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),D.appendChild(I),
-"1"==urlParams.saveAndExit&&(I=document.createElement("a"),mxUtils.write(I,mxResources.get("saveAndExit")),I.setAttribute("title",mxResources.get("saveAndExit")),I.className="geMenuItem",I.style.marginLeft="6px",I.style.padding="6px",mxEvent.addListener(I,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),D.appendChild(I));"1"!=urlParams.noExitBtn&&(I=document.createElement("a"),H="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(I,
-H),I.setAttribute("title",H),I.className="geMenuItem",I.style.marginLeft="6px",I.style.padding="6px",mxEvent.addListener(I,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),D.appendChild(I));this.buttonContainer.appendChild(D);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var d=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(D,I,H){var S=this.editorUi.editor.graph;D.smartSeparators=!0;d.apply(this,arguments);
-"1"==urlParams.sketch?S.isEnabled()&&(D.addSeparator(),1==S.getSelectionCount()&&this.addMenuItems(D,["-","lockUnlock"],null,H)):1==S.getSelectionCount()?(S.isCellFoldable(S.getSelectionCell())&&this.addMenuItems(D,S.isCellCollapsed(I)?["expand"]:["collapse"],null,H),this.addMenuItems(D,["collapsible","-","lockUnlock","enterGroup"],null,H),D.addSeparator(),this.addSubmenu("layout",D)):S.isSelectionEmpty()&&S.isEnabled()?(D.addSeparator(),this.addMenuItems(D,["editData"],null,H),D.addSeparator(),this.addSubmenu("layout",
-D),this.addSubmenu("insert",D),this.addMenuItems(D,["-","exitGroup"],null,H)):S.isEnabled()&&this.addMenuItems(D,["-","lockUnlock"],null,H)};var f=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(D,I,H){f.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(D,["copyAsImage"],null,H)};EditorUi.prototype.toggleFormatPanel=function(D){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=D?D:!this.formatWindow.window.isVisible()):
-b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var g=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();g.apply(this,arguments)};var x=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(D){x.apply(this,arguments);if(D){var I=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=I&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);
-null!=this.formatWindow&&(1E3<=I||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var y=Menus.prototype.init;Menus.prototype.init=function(){y.apply(this,arguments);var D=this.editorUi,I=D.actions.put("togglePagesVisible",new Action(mxResources.get("pages"),function(la){D.setPagesVisible(!Editor.pagesVisible)}));
-I.setToggleAction(!0);I.setSelectedCallback(function(){return Editor.pagesVisible});D.actions.put("toggleShapes",new Action(mxResources.get("shapes"),function(){k(D)},null,null,Editor.ctrlKey+"+Shift+K"));I=D.actions.put("toggleFormat",new Action(mxResources.get("format"),function(){b(D)}));I.shortcut=D.actions.get("formatPanel").shortcut;I.setToggleAction(!0);I.setSelectedCallback(mxUtils.bind(this,function(){return null!=D.formatWindow&&D.formatWindow.window.isVisible()}));EditorUi.enablePlantUml&&
-!D.isOffline()&&D.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var la=new ParseDialog(D,mxResources.get("plantUml")+"...","plantUml");D.showDialog(la.container,620,420,!0,!1);la.init()}));D.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var la=new ParseDialog(D,mxResources.get("mermaid")+"...","mermaid");D.showDialog(la.container,620,420,!0,!1);la.init()}));var H=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,
-function(la,ra){var ba=this.editorUi.editor.graph,oa=ba.getSelectionCell();H.call(this,la,oa,null,ra);this.addMenuItems(la,["editTooltip"],ra);ba.model.isVertex(oa)&&this.addMenuItems(la,["editGeometry"],ra);this.addMenuItems(la,["-","edit"],ra)})));this.addPopupMenuCellEditItems=function(la,ra,ba,oa){la.addSeparator();this.addSubmenu("editCell",la,oa,mxResources.get("edit"))};var S=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(la,ra){S.funct(la,ra);mxClient.IS_CHROMEAPP||
-EditorUi.isElectronApp||D.menus.addMenuItems(la,["publishLink"],ra);D.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(la.addSeparator(ra),D.menus.addSubmenu("embed",la,ra))})));var T=this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(la,ra){T.funct(la,ra);this.addMenuItems(la,["-","ruler","-","pageScale"],ra)})));var M="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),fa=function(la,ra,ba,oa){la.addItem(ba,null,mxUtils.bind(this,
-function(){var na=new CreateGraphDialog(D,ba,oa);D.showDialog(na.container,620,420,!0,!1);na.init()}),ra)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(la,ra){for(var ba=0;ba<M.length;ba++)"-"==M[ba]?la.addSeparator(ra):fa(la,ra,mxResources.get(M[ba])+"...",M[ba])})))};EditorUi.prototype.installFormatToolbar=function(D){var I=this.editor.graph,H=document.createElement("div");H.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%;";
-I.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(S,T){0<I.getSelectionCount()?(D.appendChild(H),H.innerHTML="Selected: "+I.getSelectionCount()):null!=H.parentNode&&H.parentNode.removeChild(H)}))};var t=!1;EditorUi.prototype.initFormatWindow=function(){if(!t&&null!=this.formatWindow){t=!0;var D=this.formatWindow.window.toggleMinimized,I=240;this.formatWindow.window.toggleMinimized=function(){D.apply(this,arguments);this.minimized?(I=parseInt(this.div.style.width),this.div.style.width=
-"140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+I-140+"px"):(this.div.style.width=I+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-I+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(H){mxEvent.getSource(H)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var G=EditorUi.prototype.init;EditorUi.prototype.init=
-function(){function D(pa,ua,Da){var Fa=M.menus.get(pa),Ma=ba.addMenu(mxResources.get(pa),mxUtils.bind(this,function(){Fa.funct.apply(this,arguments)}),ra);Ma.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Ma.style.display="inline-block";Ma.style.boxSizing="border-box";Ma.style.top="6px";Ma.style.marginRight="6px";Ma.style.height="30px";Ma.style.paddingTop="6px";Ma.style.paddingBottom="6px";Ma.style.cursor="pointer";Ma.setAttribute("title",mxResources.get(pa));M.menus.menuCreated(Fa,
-Ma,"geMenuItem");null!=Da?(Ma.style.backgroundImage="url("+Da+")",Ma.style.backgroundPosition="center center",Ma.style.backgroundRepeat="no-repeat",Ma.style.backgroundSize="24px 24px",Ma.style.width="34px",Ma.innerText=""):ua||(Ma.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",Ma.style.backgroundPosition="right 6px center",Ma.style.backgroundRepeat="no-repeat",Ma.style.paddingRight="22px");return Ma}function I(pa,ua,Da,Fa,Ma,Qa){var Ba=document.createElement("a");Ba.className=
-"1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Ba.style.display="inline-block";Ba.style.boxSizing="border-box";Ba.style.height="30px";Ba.style.padding="6px";Ba.style.position="relative";Ba.style.verticalAlign="top";Ba.style.top="0px";"1"==urlParams.sketch&&(Ba.style.borderStyle="none",Ba.style.boxShadow="none",Ba.style.padding="6px",Ba.style.margin="0px");null!=M.statusContainer?la.insertBefore(Ba,M.statusContainer):la.appendChild(Ba);null!=Qa?(Ba.style.backgroundImage="url("+Qa+")",Ba.style.backgroundPosition=
-"center center",Ba.style.backgroundRepeat="no-repeat",Ba.style.backgroundSize="24px 24px",Ba.style.width="34px"):mxUtils.write(Ba,pa);mxEvent.addListener(Ba,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(Ka){Ka.preventDefault()}));mxEvent.addListener(Ba,"click",function(Ka){"disabled"!=Ba.getAttribute("disabled")&&ua(Ka);mxEvent.consume(Ka)});null==Da&&(Ba.style.marginRight="4px");null!=Fa&&Ba.setAttribute("title",Fa);null!=Ma&&(pa=function(){Ma.isEnabled()?(Ba.removeAttribute("disabled"),
-Ba.style.cursor="pointer"):(Ba.setAttribute("disabled","disabled"),Ba.style.cursor="default")},Ma.addListener("stateChanged",pa),fa.addListener("enabledChanged",pa),pa());return Ba}function H(pa,ua,Da){Da=document.createElement("div");Da.className="geMenuItem";Da.style.display="inline-block";Da.style.verticalAlign="top";Da.style.marginRight="6px";Da.style.padding="0 4px 0 4px";Da.style.height="30px";Da.style.position="relative";Da.style.top="0px";"1"==urlParams.sketch&&(Da.style.boxShadow="none");
-for(var Fa=0;Fa<pa.length;Fa++)null!=pa[Fa]&&("1"==urlParams.sketch&&(pa[Fa].style.padding="10px 8px",pa[Fa].style.width="30px"),pa[Fa].style.margin="0px",pa[Fa].style.boxShadow="none",Da.appendChild(pa[Fa]));null!=ua&&mxUtils.setOpacity(Da,ua);null!=M.statusContainer&&"1"!=urlParams.sketch?la.insertBefore(Da,M.statusContainer):la.appendChild(Da);return Da}function S(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(ia.style.left=58>X.offsetTop-X.offsetHeight/2?"70px":"10px");else{for(var pa=
-la.firstChild;null!=pa;){var ua=pa.nextSibling;"geMenuItem"!=pa.className&&"geItem"!=pa.className||pa.parentNode.removeChild(pa);pa=ua}ra=la.firstChild;m=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;pa=1E3>m||"1"==urlParams.sketch;var Da=null;pa||(Da=D("diagram"));ua=pa?D("diagram",null,Editor.menuImage):null;null!=ua&&(Da=ua);H([Da,I(mxResources.get("shapes"),M.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),M.actions.get("image"),pa?Editor.shapesImage:
-null),I(mxResources.get("format"),M.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+M.actions.get("formatPanel").shortcut+")",M.actions.get("image"),pa?Editor.formatImage:null)],pa?60:null);ua=D("insert",!0,pa?V:null);H([ua,I(mxResources.get("delete"),M.actions.get("delete").funct,null,mxResources.get("delete"),M.actions.get("delete"),pa?Editor.trashImage:null)],pa?60:null);411<=m&&(H([Ca,Sa],60),520<=m&&H([O,640<=m?I("",ya.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+
-" +)",ya,Editor.zoomInImage):null,640<=m?I("",Aa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",Aa,Editor.zoomOutImage):null],60))}null!=Da&&(mxEvent.disableContextMenu(Da),mxEvent.addGestureListeners(Da,mxUtils.bind(this,function(Fa){(mxEvent.isShiftDown(Fa)||mxEvent.isAltDown(Fa)||mxEvent.isMetaDown(Fa)||mxEvent.isControlDown(Fa)||mxEvent.isPopupTrigger(Fa))&&M.appIconClicked(Fa)}),null,null));ua=M.menus.get("language");null!=ua&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=
-m&&"1"!=urlParams.embed&&"1"!=urlParams.sketch?(null==W&&(ua=ba.addMenu("",ua.funct),ua.setAttribute("title","language"),ua.className="geToolbarButton",ua.style.backgroundImage="url("+Editor.globeImage+")",ua.style.backgroundPosition="center center",ua.style.backgroundRepeat="no-repeat",ua.style.backgroundSize="22px 22px",ua.style.position="absolute",ua.style.height="24px",ua.style.width="24px",ua.style.zIndex="1",ua.style.right="8px",ua.style.cursor="pointer",ua.style.top="12px",la.appendChild(ua),
-W=ua),M.buttonContainer.style.paddingRight="34px"):(M.buttonContainer.style.paddingRight="4px",null!=W&&(W.parentNode.removeChild(W),W=null))}G.apply(this,arguments);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="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(T);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&(this.editor.chromeless&&
-!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=urlParams.sketch&&1E3<=m||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])k(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));
-var M=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==M.embedViewport)mxUtils.fit(this.div);else{var pa=parseInt(this.div.offsetLeft),ua=parseInt(this.div.offsetWidth),Da=M.embedViewport.x+M.embedViewport.width,Fa=parseInt(this.div.offsetTop),Ma=parseInt(this.div.offsetHeight),Qa=M.embedViewport.y+M.embedViewport.height;this.div.style.left=Math.max(M.embedViewport.x,Math.min(pa,Da-ua))+"px";this.div.style.top=Math.max(M.embedViewport.y,Math.min(Fa,Qa-Ma))+"px";this.div.style.height=
-Math.min(M.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(M.embedViewport.width,parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=m)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),T=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>m||708>T)?this.formatWindow.window.toggleMinimized():
-this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));M=this;var fa=M.editor.graph;M.toolbar=this.createToolbar(M.createDiv("geToolbar"));M.defaultLibraryName=mxResources.get("untitledLibrary");var la=document.createElement("div");la.className="geMenubarContainer";var ra=null,ba=new Menubar(M,la);M.statusContainer=M.createStatusContainer();M.statusContainer.style.position="relative";M.statusContainer.style.maxWidth="";M.statusContainer.style.marginTop="7px";M.statusContainer.style.marginLeft=
-"6px";M.statusContainer.style.color="gray";M.statusContainer.style.cursor="default";var oa=M.hideCurrentMenu;M.hideCurrentMenu=function(){oa.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var na=M.descriptorChanged;M.descriptorChanged=function(){na.apply(this,arguments);var pa=M.getCurrentFile();if(null!=pa&&null!=pa.getTitle()){var ua=pa.getMode();"google"==ua?ua="googleDrive":"github"==ua?ua="gitHub":"gitlab"==ua?ua="gitLab":"onedrive"==ua&&(ua="oneDrive");ua=mxResources.get(ua);
-la.setAttribute("title",pa.getTitle()+(null!=ua?" ("+ua+")":""))}else la.removeAttribute("title")};M.setStatusText(M.editor.getStatus());la.appendChild(M.statusContainer);M.buttonContainer=document.createElement("div");M.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";la.appendChild(M.buttonContainer);M.menubarContainer=M.buttonContainer;M.tabContainer=document.createElement("div");M.tabContainer.className=
-"geTabContainer";M.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";T=M.diagramContainer.parentNode;var N=document.createElement("div");N.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";M.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){N.style.top="20px";M.titlebar=document.createElement("div");M.titlebar.style.cssText=
-"position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var aa=document.createElement("div");aa.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";M.titlebar.appendChild(aa);T.appendChild(M.titlebar)}var V="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,ha="1"==urlParams.sketch?document.createElement("div"):null,X="1"==
-urlParams.sketch?document.createElement("div"):null,ia="1"==urlParams.sketch?document.createElement("div"):null,q=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)ia.style.left="10px",ia.style.top="10px",X.style.left="10px",X.style.top="60px",ha.style.top="10px",ha.style.right="12px",ha.style.left="",M.diagramContainer.setAttribute("data-bounds",M.diagramContainer.style.top+" "+M.diagramContainer.style.left+" "+M.diagramContainer.style.width+" "+M.diagramContainer.style.height),M.diagramContainer.style.top=
-"0px",M.diagramContainer.style.left="0px",M.diagramContainer.style.bottom="0px",M.diagramContainer.style.right="0px",M.diagramContainer.style.width="",M.diagramContainer.style.height="";else{var pa=M.diagramContainer.getAttribute("data-bounds");if(null!=pa){M.diagramContainer.style.background="transparent";M.diagramContainer.removeAttribute("data-bounds");var ua=fa.getGraphBounds();pa=pa.split(" ");M.diagramContainer.style.top=pa[0];M.diagramContainer.style.left=pa[1];M.diagramContainer.style.width=
-ua.width+50+"px";M.diagramContainer.style.height=ua.height+46+"px";M.diagramContainer.style.bottom="";M.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:M.diagramContainer.getBoundingClientRect()}),"*");M.refresh()}ia.style.left=M.diagramContainer.offsetLeft+"px";ia.style.top=M.diagramContainer.offsetTop-ia.offsetHeight-4+"px";X.style.display="";X.style.left=M.diagramContainer.offsetLeft-X.offsetWidth-4+"px";X.style.top=M.diagramContainer.offsetTop+
-"px";ha.style.left=M.diagramContainer.offsetLeft+M.diagramContainer.offsetWidth-ha.offsetWidth+"px";ha.style.top=ia.style.top;ha.style.right="";M.bottomResizer.style.left=M.diagramContainer.offsetLeft+(M.diagramContainer.offsetWidth-M.bottomResizer.offsetWidth)/2+"px";M.bottomResizer.style.top=M.diagramContainer.offsetTop+M.diagramContainer.offsetHeight-M.bottomResizer.offsetHeight/2-1+"px";M.rightResizer.style.left=M.diagramContainer.offsetLeft+M.diagramContainer.offsetWidth-M.rightResizer.offsetWidth/
-2-1+"px";M.rightResizer.style.top=M.diagramContainer.offsetTop+(M.diagramContainer.offsetHeight-M.bottomResizer.offsetHeight)/2+"px"}M.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";M.rightResizer.style.visibility=M.bottomResizer.style.visibility;la.style.display="none";ia.style.visibility="";ha.style.visibility=""});aa=M.actions.get("fullscreen");var E=I("",aa.funct,null,mxResources.get(""),aa,Editor.fullscreenImage),Q=mxUtils.bind(this,function(){E.style.backgroundImage="url("+
-(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";q()});aa=mxUtils.bind(this,function(){b(M,!0);M.initFormatWindow();var pa=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(pa.x+pa.width+4,pa.y);Q()});M.addListener("inlineFullscreenChanged",Q);M.addListener("editInlineStart",aa);"1"==urlParams.embedInline&&M.addListener("darkModeChanged",
-aa);M.addListener("editInlineStop",mxUtils.bind(this,function(pa){M.diagramContainer.style.width="10px";M.diagramContainer.style.height="10px";M.diagramContainer.style.border="";M.bottomResizer.style.visibility="hidden";M.rightResizer.style.visibility="hidden";ia.style.visibility="hidden";ha.style.visibility="hidden";X.style.display="none"}));if(null!=M.hoverIcons){var Y=M.hoverIcons.update;M.hoverIcons.update=function(){fa.freehand.isDrawing()||Y.apply(this,arguments)}}if(null!=fa.freehand){var R=
-fa.freehand.createStyle;fa.freehand.createStyle=function(pa){return R.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){X.className="geToolbarContainer";ha.className="geToolbarContainer";ia.className="geToolbarContainer";la.className="geToolbarContainer";M.picker=X;M.sketchPickerMenuElt=X;var Z=!1;"1"!=urlParams.embed&&"atlassian"!=M.getServiceName()&&(mxEvent.addListener(la,"mouseenter",function(){M.statusContainer.style.display="inline-block"}),mxEvent.addListener(la,"mouseleave",function(){Z||
-(M.statusContainer.style.display="none")}));var da=mxUtils.bind(this,function(pa){null!=M.notificationBtn&&(null!=pa?M.notificationBtn.setAttribute("title",pa):M.notificationBtn.removeAttribute("title"))});la.style.visibility=20>la.clientWidth?"hidden":"";M.editor.addListener("statusChanged",mxUtils.bind(this,function(){M.setStatusText(M.editor.getStatus());if("1"!=urlParams.embed&&"atlassian"!=M.getServiceName())if(M.statusContainer.style.display="inline-block",Z=!0,1==M.statusContainer.children.length&&
-""==M.editor.getStatus())la.style.visibility="hidden";else{if(0==M.statusContainer.children.length||1==M.statusContainer.children.length&&"function"===typeof M.statusContainer.firstChild.getAttribute&&null==M.statusContainer.firstChild.getAttribute("class")){var pa=null!=M.statusContainer.firstChild&&"function"===typeof M.statusContainer.firstChild.getAttribute?M.statusContainer.firstChild.getAttribute("title"):M.editor.getStatus();da(pa);var ua=M.getCurrentFile();ua=null!=ua?ua.savingStatusKey:DrawioFile.prototype.savingStatusKey;
-pa==mxResources.get(ua)+"..."?(M.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(ua))+'..."src="'+Editor.tailSpin+'">',M.statusContainer.style.display="inline-block",Z=!0):6<M.buttonContainer.clientWidth&&(M.statusContainer.style.display="none",Z=!1)}else M.statusContainer.style.display="inline-block",da(null),Z=!0;la.style.visibility=20>la.clientWidth&&!Z?"hidden":""}}));J=D("diagram",null,Editor.menuImage);J.style.boxShadow="none";J.style.padding="6px";J.style.margin=
-"0px";ia.appendChild(J);mxEvent.disableContextMenu(J);mxEvent.addGestureListeners(J,mxUtils.bind(this,function(pa){(mxEvent.isShiftDown(pa)||mxEvent.isAltDown(pa)||mxEvent.isMetaDown(pa)||mxEvent.isControlDown(pa)||mxEvent.isPopupTrigger(pa))&&this.appIconClicked(pa)}),null,null);M.statusContainer.style.position="";M.statusContainer.style.display="none";M.statusContainer.style.margin="0px";M.statusContainer.style.padding="6px 0px";M.statusContainer.style.maxWidth=Math.min(m-240,280)+"px";M.statusContainer.style.display=
-"inline-block";M.statusContainer.style.textOverflow="ellipsis";M.buttonContainer.style.display="inline-block";M.buttonContainer.style.position="relative";M.buttonContainer.style.paddingRight="0px";M.buttonContainer.style.top="0px";var qa=document.createElement("a");qa.style.padding="0px";qa.style.boxShadow="none";qa.className="geMenuItem";qa.style.display="inline-block";qa.style.width="40px";qa.style.height="12px";qa.style.marginBottom="-2px";qa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+
-")";qa.style.backgroundPosition="top center";qa.style.backgroundRepeat="no-repeat";qa.setAttribute("title","Minimize");var va=!1,ja=mxUtils.bind(this,function(){X.innerText="";if(!va){var pa=function(ua,Da,Fa,Ma){null!=Da&&ua.setAttribute("title",Da);ua.style.cursor=null!=Fa?Fa:"default";ua.style.margin="2px 0px";X.appendChild(ua);mxUtils.br(X);null!=Ma&&(ua.style.position="relative",ua.style.overflow="visible",Da=document.createElement("div"),Da.style.position="absolute",Da.style.left="34px",Da.style.top=
-"28px",Da.style.fontSize="8px",mxUtils.write(Da,Ma),ua.appendChild(Da));return ua};pa(M.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+" (A)",null,"A");pa(M.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",
-140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");pa(M.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle")+" (D)",!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");pa(M.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");(function(){var ua=new mxCell("",new mxGeometry(0,0,fa.defaultEdgeLength,
-0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");ua.geometry.setTerminalPoint(new mxPoint(0,0),!0);ua.geometry.setTerminalPoint(new mxPoint(ua.geometry.width,0),!1);ua.geometry.points=[];ua.geometry.relative=!0;ua.edge=!0;pa(M.sidebar.createEdgeTemplateFromCells([ua],ua.geometry.width,ua.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");ua=ua.clone();ua.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";
-ua.geometry.width=fa.defaultEdgeLength+20;ua.geometry.setTerminalPoint(new mxPoint(0,20),!0);ua.geometry.setTerminalPoint(new mxPoint(ua.geometry.width,20),!1);pa(M.sidebar.createEdgeTemplateFromCells([ua],ua.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"))})();(function(ua,Da,Fa,Ma){ua=I("",ua.funct,null,Da,ua,Fa);ua.style.width="40px";ua.style.height="34px";ua.style.opacity="0.7";return pa(ua,null,"pointer",Ma)})(M.actions.get("insertFreehand"),mxResources.get("freehand")+
-" (X)",Editor.freehandImage,"X");J=D("insert",null,Editor.plusImage);J.style.boxShadow="none";J.style.opacity="0.7";J.style.padding="6px";J.style.margin="0px";J.style.height="34px";J.style.width="37px";pa(J,null,"pointer")}"1"!=urlParams.embedInline&&X.appendChild(qa)});mxEvent.addListener(qa,"click",mxUtils.bind(this,function(){va?(mxUtils.setPrefixedStyle(X.style,"transform","translate(0, -50%)"),X.style.padding="8px 6px 4px",X.style.top="50%",X.style.bottom="",X.style.height="",qa.style.backgroundImage=
-"url("+mxWindow.prototype.normalizeImage+")",qa.style.width="40px",qa.style.height="12px",qa.setAttribute("title","Minimize"),va=!1,ja()):(X.innerText="",X.appendChild(qa),mxUtils.setPrefixedStyle(X.style,"transform","translate(0, 0)"),X.style.top="",X.style.bottom="12px",X.style.padding="0px",X.style.height="24px",qa.style.height="24px",qa.style.backgroundImage="url("+Editor.plusImage+")",qa.setAttribute("title",mxResources.get("insert")),qa.style.width="24px",va=!0)}));ja();M.addListener("darkModeChanged",
-ja);M.addListener("sketchModeChanged",ja)}else M.editor.addListener("statusChanged",mxUtils.bind(this,function(){M.setStatusText(M.editor.getStatus())}));aa=M.menus.get("viewZoom");if(null!=aa){var sa=function(pa){if(mxEvent.isAltDown(pa))M.hideCurrentMenu(),M.actions.get("customZoom").funct(),mxEvent.consume(pa);else if("geItem"!=mxEvent.getSource(pa).className||mxEvent.isShiftDown(pa))M.hideCurrentMenu(),M.actions.get("smartFit").funct(),mxEvent.consume(pa)},ya=M.actions.get("zoomIn"),Aa=M.actions.get("zoomOut"),
-Ea=M.actions.get("resetView"),za=M.actions.get("undo"),Ia=M.actions.get("redo"),Ca=I("",za.funct,null,mxResources.get("undo")+" ("+za.shortcut+")",za,Editor.undoImage),Sa=I("",Ia.funct,null,mxResources.get("redo")+" ("+Ia.shortcut+")",Ia,Editor.redoImage);if(null!=ha){Ea=function(){z.style.display=null!=M.pages&&("0"!=urlParams.pages||1<M.pages.length||Editor.pagesVisible)?"inline-block":"none"};var Pa=function(){z.innerText="";if(null!=M.currentPage){mxUtils.write(z,M.currentPage.getName());var pa=
-null!=M.pages?M.pages.length:1,ua=M.getPageIndex(M.currentPage);ua=null!=ua?ua+1:1;var Da=M.currentPage.getId();z.setAttribute("title",M.currentPage.getName()+" ("+ua+"/"+pa+")"+(null!=Da?" ["+Da+"]":""))}},Ta=M.actions.get("delete"),Za=I("",Ta.funct,null,mxResources.get("delete"),Ta,Editor.trashImage);Za.style.opacity="0.3";ia.appendChild(Za);Ta.addListener("stateChanged",function(){Za.style.opacity=Ta.enabled?"":"0.3"});var Na=function(){Ca.style.display=0<M.editor.undoManager.history.length||fa.isEditing()?
-"inline-block":"none";Sa.style.display=Ca.style.display;Ca.style.opacity=za.enabled?"":"0.3";Sa.style.opacity=Ia.enabled?"":"0.3"};ia.appendChild(Ca);ia.appendChild(Sa);za.addListener("stateChanged",Na);Ia.addListener("stateChanged",Na);Na();var z=this.createPageMenuTab(!1,!0);z.style.cssText="display:inline-block;white-space:nowrap;overflow:hidden;padding:6px;cursor:pointer;max-width:160px;text-overflow:ellipsis;";ha.appendChild(z);M.editor.addListener("pagesPatched",Pa);M.editor.addListener("pageSelected",
-Pa);M.editor.addListener("pageRenamed",Pa);M.editor.addListener("fileLoaded",Pa);Pa();M.addListener("fileDescriptorChanged",Ea);M.addListener("pagesVisibleChanged",Ea);M.editor.addListener("pagesPatched",Ea);Ea();Ea=I("",Aa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",Aa,Editor.zoomOutImage);ha.appendChild(Ea);var J=ba.addMenu("100%",aa.funct);J.setAttribute("title",mxResources.get("zoom"));J.innerHTML="100%";J.style.display="inline-block";J.style.color="inherit";J.style.cursor=
-"pointer";J.style.textAlign="center";J.style.whiteSpace="nowrap";J.style.paddingRight="10px";J.style.textDecoration="none";J.style.verticalAlign="top";J.style.padding="6px 0";J.style.fontSize="14px";J.style.width="40px";ha.appendChild(J);aa=I("",ya.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",ya,Editor.zoomInImage);ha.appendChild(aa);"1"==urlParams.embedInline?(ha.appendChild(E),aa=M.actions.get("exit"),ha.appendChild(I("",aa.funct,null,mxResources.get("exit"),aa,Editor.closeImage))):
-E.parentNode.removeChild(E);M.tabContainer.style.visibility="hidden";la.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";ia.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
-ha.style.cssText="position:absolute;right:14px;bottom:14px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";N.appendChild(ia);N.appendChild(ha);X.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";mxClient.IS_POINTER&&(X.style.touchAction="none");N.appendChild(X);window.setTimeout(function(){mxUtils.setPrefixedStyle(X.style,
-"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(N)}else{var O=I("",sa,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",Ea,Editor.zoomFitImage);la.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";J=ba.addMenu("100%",aa.funct);J.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");J.style.whiteSpace="nowrap";J.style.paddingRight=
-"10px";J.style.textDecoration="none";J.style.textDecoration="none";J.style.overflow="hidden";J.style.visibility="hidden";J.style.textAlign="center";J.style.cursor="pointer";J.style.height=parseInt(M.tabContainerHeight)-1+"px";J.style.lineHeight=parseInt(M.tabContainerHeight)+1+"px";J.style.position="absolute";J.style.display="block";J.style.fontSize="12px";J.style.width="59px";J.style.right="0px";J.style.bottom="0px";J.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";J.style.backgroundPosition=
-"right 6px center";J.style.backgroundRepeat="no-repeat";N.appendChild(J)}(function(pa){mxEvent.addListener(pa,"click",sa);var ua=mxUtils.bind(this,function(){pa.innerText="";mxUtils.write(pa,Math.round(100*M.editor.graph.view.scale)+"%")});M.editor.graph.view.addListener(mxEvent.EVENT_SCALE,ua);M.editor.addListener("resetGraphView",ua);M.editor.addListener("pageSelected",ua)})(J);var U=M.setGraphEnabled;M.setGraphEnabled=function(){U.apply(this,arguments);null!=this.tabContainer&&(J.style.visibility=
-this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==ha?this.tabContainerHeight+"px":"0px")}}N.appendChild(la);N.appendChild(M.diagramContainer);T.appendChild(N);M.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=m)&&"1"!=urlParams.embedInline&&b(this,!0);null==ha&&N.appendChild(M.tabContainer);var W=null;S();mxEvent.addListener(window,"resize",function(){S();null!=M.sidebarWindow&&M.sidebarWindow.window.fit();
-null!=M.formatWindow&&M.formatWindow.window.fit();null!=M.actions.outlineWindow&&M.actions.outlineWindow.window.fit();null!=M.actions.layersWindow&&M.actions.layersWindow.window.fit();null!=M.menus.tagsWindow&&M.menus.tagsWindow.window.fit();null!=M.menus.findWindow&&M.menus.findWindow.window.fit();null!=M.menus.findReplaceWindow&&M.menus.findReplaceWindow.window.fit()});if("1"==urlParams.embedInline){document.body.style.cursor="text";X.style.transform="";mxEvent.addGestureListeners(M.diagramContainer.parentNode,
-function(pa){mxEvent.getSource(pa)==M.diagramContainer.parentNode&&(M.embedExitPoint=new mxPoint(mxEvent.getClientX(pa),mxEvent.getClientY(pa)),M.sendEmbeddedSvgExport())});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";M.diagramContainer.parentNode.appendChild(T);M.bottomResizer=T;var ea=null,ka=null,xa=null,ta=null;mxEvent.addGestureListeners(T,
-function(pa){ta=parseInt(M.diagramContainer.style.height);ka=mxEvent.getClientY(pa);fa.popupMenuHandler.hideMenu();mxEvent.consume(pa)});T=T.cloneNode(!1);T.style.cursor="col-resize";M.diagramContainer.parentNode.appendChild(T);M.rightResizer=T;mxEvent.addGestureListeners(T,function(pa){xa=parseInt(M.diagramContainer.style.width);ea=mxEvent.getClientX(pa);fa.popupMenuHandler.hideMenu();mxEvent.consume(pa)});mxEvent.addGestureListeners(document.body,null,function(pa){var ua=!1;null!=ea&&(M.diagramContainer.style.width=
-Math.max(20,xa+mxEvent.getClientX(pa)-ea)+"px",ua=!0);null!=ka&&(M.diagramContainer.style.height=Math.max(20,ta+mxEvent.getClientY(pa)-ka)+"px",ua=!0);ua&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:M.diagramContainer.getBoundingClientRect()}),"*"),q(),M.refresh())},function(pa){null==ea&&null==ka||mxEvent.consume(pa);ka=ea=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";
-M.bottomResizer.style.visibility="hidden";M.rightResizer.style.visibility="hidden";ia.style.visibility="hidden";ha.style.visibility="hidden";X.style.display="none"}"1"==urlParams.prefetchFonts&&M.editor.loadFonts()}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,e,k,m,C,p,F){this.file=b;this.id=e;this.content=k;this.modifiedDate=m;this.createdDate=C;this.isResolved=p;this.user=F;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,k,m,C){e()};DrawioComment.prototype.editComment=function(b,e,k){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DrawioUser=function(b,e,k,m,C){this.id=b;this.email=e;this.displayName=k;this.pictureUrl=m;this.locale=C};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About\naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nbeta=beta\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\nrealtimeCollaboration=Real-Time Collaboration\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedFonts=Embed Fonts\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified.\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngetNotionChromeExtension=Get the Notion Chrome Extension\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlabels=Labels\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save.\nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunmerge=Unmerge\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found\nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\nconfDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?\nconfDraftTooBigErr=Draft size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration?\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\npathFilename=Path/Filename\nconfAHugeInstances=Very Large Instances\nconfAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to request the current instance pages list from Atlassian. Please contact our support for more details.\nchoosePageIDsFile=Choose current page IDs csv file\nchooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file\nprivate=Private\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
-Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-style2"];GraphViewer=function(b,e,k){this.init(b,e,k)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl="https://viewer.diagrams.net/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?24:26;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!1;GraphViewer.prototype.autoCrop=!1;
+Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var D=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");D.apply(this,arguments)};var p=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){p.apply(this,arguments);this.menus.get("save").setEnabled(null!=
+this.getCurrentFile()||"1"==urlParams.embed)};var E=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(t,B){null!=B.shortcut&&900>l&&!mxClient.IS_IOS?t.firstChild.nextSibling.setAttribute("title",B.shortcut):E.apply(this,arguments)};var N=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){N.apply(this,arguments);if(null!=this.userElement){var t=this.userElement;t.style.cssText="position:relative;cursor:pointer;display:"+t.style.display;t.className="geToolbarButton";
+t.innerText="";t.style.backgroundImage="url("+Editor.userImage+")";t.style.backgroundPosition="center center";t.style.backgroundRepeat="no-repeat";t.style.backgroundSize="24px 24px";t.style.height="24px";t.style.width="24px";var B=mxResources.get("changeUser");if("none"!=t.style.display){t.style.display="inline-block";var I=this.getCurrentFile();if(null!=I&&I.isRealtimeEnabled()&&I.isRealtimeSupported()){var O=document.createElement("img");O.setAttribute("border","0");O.style.position="absolute";
+O.style.left="18px";O.style.top="2px";O.style.width="12px";O.style.height="12px";var J=I.getRealtimeError();I=I.getRealtimeState();B+=" ("+mxResources.get("realtimeCollaboration")+": ";1==I?(O.src=Editor.syncImage,B+=mxResources.get("online")):(O.src=Editor.syncProblemImage,B=null!=J&&null!=J.message?B+J.message:B+mxResources.get("disconnected"));t.style.marginRight="6px";t.appendChild(O);B+=")"}}t.setAttribute("title",B)}};var R=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=
+function(){R.apply(this,arguments);null!=this.shareButton&&(this.shareButton.style.display="none")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var t=document.createElement("div");t.style.display="inline-block";t.style.position="relative";t.style.marginTop="6px";t.style.marginRight="4px";var B=document.createElement("a");B.className="geMenuItem gePrimaryBtn";B.style.marginLeft="8px";B.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!=
+urlParams.saveAndExit){var I="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(B,I);B.setAttribute("title",I);mxEvent.addListener(B,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));t.appendChild(B)}}else mxUtils.write(B,mxResources.get("save")),B.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(B,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),t.appendChild(B),
+"1"==urlParams.saveAndExit&&(B=document.createElement("a"),mxUtils.write(B,mxResources.get("saveAndExit")),B.setAttribute("title",mxResources.get("saveAndExit")),B.className="geMenuItem",B.style.marginLeft="6px",B.style.padding="6px",mxEvent.addListener(B,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),t.appendChild(B));"1"!=urlParams.noExitBtn&&(B=document.createElement("a"),I="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(B,
+I),B.setAttribute("title",I),B.className="geMenuItem",B.style.marginLeft="6px",B.style.padding="6px",mxEvent.addListener(B,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),t.appendChild(B));this.buttonContainer.appendChild(t);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var G=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(t,B,I){var O=this.editorUi.editor.graph;t.smartSeparators=!0;G.apply(this,arguments);
+"1"==urlParams.sketch?O.isEnabled()&&(t.addSeparator(),1==O.getSelectionCount()&&this.addMenuItems(t,["-","lockUnlock"],null,I)):1==O.getSelectionCount()?(O.isCellFoldable(O.getSelectionCell())&&this.addMenuItems(t,O.isCellCollapsed(B)?["expand"]:["collapse"],null,I),this.addMenuItems(t,["collapsible","-","lockUnlock","enterGroup"],null,I),t.addSeparator(),this.addSubmenu("layout",t)):O.isSelectionEmpty()&&O.isEnabled()?(t.addSeparator(),this.addMenuItems(t,["editData"],null,I),t.addSeparator(),this.addSubmenu("layout",
+t),this.addSubmenu("insert",t),this.addMenuItems(t,["-","exitGroup"],null,I)):O.isEnabled()&&this.addMenuItems(t,["-","lockUnlock"],null,I)};var M=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(t,B,I){M.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(t,["copyAsImage"],null,I)};EditorUi.prototype.toggleFormatPanel=function(t){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=t?t:!this.formatWindow.window.isVisible()):
+b(this)};EditorUi.prototype.isFormatPanelVisible=function(){return null!=this.formatWindow&&this.formatWindow.window.isVisible()};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var Q=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();Q.apply(this,arguments)};var e=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(t){e.apply(this,arguments);if(t){var B=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;
+1E3<=B&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=B||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var f=Menus.prototype.init;Menus.prototype.init=function(){f.apply(this,arguments);var t=this.editorUi,B=t.actions.put("togglePagesVisible",
+new Action(mxResources.get("pages"),function(da){t.setPagesVisible(!Editor.pagesVisible)}));B.setToggleAction(!0);B.setSelectedCallback(function(){return Editor.pagesVisible});t.actions.put("toggleShapes",new Action(mxResources.get("shapes"),function(){g(t)},null,null,Editor.ctrlKey+"+Shift+K"));EditorUi.enablePlantUml&&!t.isOffline()&&t.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var da=new ParseDialog(t,mxResources.get("plantUml")+"...","plantUml");t.showDialog(da.container,
+620,420,!0,!1);da.init()}));t.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var da=new ParseDialog(t,mxResources.get("mermaid")+"...","mermaid");t.showDialog(da.container,620,420,!0,!1);da.init()}));var I=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(da,ja){var aa=this.editorUi.editor.graph,qa=aa.getSelectionCell();I.call(this,da,qa,null,ja);this.addMenuItems(da,["editTooltip"],ja);aa.model.isVertex(qa)&&this.addMenuItems(da,
+["editGeometry"],ja);this.addMenuItems(da,["-","edit"],ja)})));this.addPopupMenuCellEditItems=function(da,ja,aa,qa){da.addSeparator();this.addSubmenu("editCell",da,qa,mxResources.get("edit"))};var O=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(da,ja){O.funct(da,ja);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||t.menus.addMenuItems(da,["publishLink"],ja);t.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(da.addSeparator(ja),t.menus.addSubmenu("embed",da,ja))})));var J=
+this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(da,ja){J.funct(da,ja);this.addMenuItems(da,["-","ruler","-","pageScale"],ja)})));var y="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),ia=function(da,ja,aa,qa){da.addItem(aa,null,mxUtils.bind(this,function(){var sa=new CreateGraphDialog(t,aa,qa);t.showDialog(sa.container,620,420,!0,!1);sa.init()}),ja)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(da,ja){for(var aa=
+0;aa<y.length;aa++)"-"==y[aa]?da.addSeparator(ja):ia(da,ja,mxResources.get(y[aa])+"...",y[aa])})))};EditorUi.prototype.installFormatToolbar=function(t){var B=this.editor.graph,I=document.createElement("div");I.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%;";B.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(O,J){0<B.getSelectionCount()?
+(t.appendChild(I),I.innerHTML="Selected: "+B.getSelectionCount()):null!=I.parentNode&&I.parentNode.removeChild(I)}))};var k=!1;EditorUi.prototype.initFormatWindow=function(){if(!k&&null!=this.formatWindow){k=!0;var t=this.formatWindow.window.toggleMinimized,B=240;this.formatWindow.window.toggleMinimized=function(){t.apply(this,arguments);this.minimized?(B=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+B-
+140+"px"):(this.div.style.width=B+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-B+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(I){mxEvent.getSource(I)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var z=EditorUi.prototype.init;EditorUi.prototype.init=function(){function t(oa,ta,Ea){var Fa=y.menus.get(oa),Pa=aa.addMenu(mxResources.get(oa),
+mxUtils.bind(this,function(){Fa.funct.apply(this,arguments)}),ja);Pa.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Pa.style.display="inline-block";Pa.style.boxSizing="border-box";Pa.style.top="6px";Pa.style.marginRight="6px";Pa.style.height="30px";Pa.style.paddingTop="6px";Pa.style.paddingBottom="6px";Pa.style.cursor="pointer";Pa.setAttribute("title",mxResources.get(oa));y.menus.menuCreated(Fa,Pa,"geMenuItem");null!=Ea?(Pa.style.backgroundImage="url("+Ea+")",Pa.style.backgroundPosition=
+"center center",Pa.style.backgroundRepeat="no-repeat",Pa.style.backgroundSize="24px 24px",Pa.style.width="34px",Pa.innerText=""):ta||(Pa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",Pa.style.backgroundPosition="right 6px center",Pa.style.backgroundRepeat="no-repeat",Pa.style.paddingRight="22px");return Pa}function B(oa,ta,Ea,Fa,Pa,Ra){var Ca=document.createElement("a");Ca.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Ca.style.display="inline-block";Ca.style.boxSizing=
+"border-box";Ca.style.height="30px";Ca.style.padding="6px";Ca.style.position="relative";Ca.style.verticalAlign="top";Ca.style.top="0px";"1"==urlParams.sketch&&(Ca.style.borderStyle="none",Ca.style.boxShadow="none",Ca.style.padding="6px",Ca.style.margin="0px");null!=y.statusContainer?da.insertBefore(Ca,y.statusContainer):da.appendChild(Ca);null!=Ra?(Ca.style.backgroundImage="url("+Ra+")",Ca.style.backgroundPosition="center center",Ca.style.backgroundRepeat="no-repeat",Ca.style.backgroundSize="24px 24px",
+Ca.style.width="34px"):mxUtils.write(Ca,oa);mxEvent.addListener(Ca,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(Ja){Ja.preventDefault()}));mxEvent.addListener(Ca,"click",function(Ja){"disabled"!=Ca.getAttribute("disabled")&&ta(Ja);mxEvent.consume(Ja)});null==Ea&&(Ca.style.marginRight="4px");null!=Fa&&Ca.setAttribute("title",Fa);null!=Pa&&(oa=function(){Pa.isEnabled()?(Ca.removeAttribute("disabled"),Ca.style.cursor="pointer"):(Ca.setAttribute("disabled","disabled"),Ca.style.cursor=
+"default")},Pa.addListener("stateChanged",oa),ia.addListener("enabledChanged",oa),oa());return Ca}function I(oa,ta,Ea){Ea=document.createElement("div");Ea.className="geMenuItem";Ea.style.display="inline-block";Ea.style.verticalAlign="top";Ea.style.marginRight="6px";Ea.style.padding="0 4px 0 4px";Ea.style.height="30px";Ea.style.position="relative";Ea.style.top="0px";"1"==urlParams.sketch&&(Ea.style.boxShadow="none");for(var Fa=0;Fa<oa.length;Fa++)null!=oa[Fa]&&("1"==urlParams.sketch&&(oa[Fa].style.padding=
+"10px 8px",oa[Fa].style.width="30px"),oa[Fa].style.margin="0px",oa[Fa].style.boxShadow="none",Ea.appendChild(oa[Fa]));null!=ta&&mxUtils.setOpacity(Ea,ta);null!=y.statusContainer&&"1"!=urlParams.sketch?da.insertBefore(Ea,y.statusContainer):da.appendChild(Ea);return Ea}function O(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(ka.style.left=58>W.offsetTop-W.offsetHeight/2?"70px":"10px");else{for(var oa=da.firstChild;null!=oa;){var ta=oa.nextSibling;"geMenuItem"!=oa.className&&"geItem"!=oa.className||
+oa.parentNode.removeChild(oa);oa=ta}ja=da.firstChild;l=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;oa=1E3>l||"1"==urlParams.sketch;var Ea=null;oa||(Ea=t("diagram"));ta=oa?t("diagram",null,Editor.menuImage):null;null!=ta&&(Ea=ta);I([Ea,B(mxResources.get("shapes"),y.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),y.actions.get("image"),oa?Editor.shapesImage:null),B(mxResources.get("format"),y.actions.get("format").funct,null,mxResources.get("format")+
+" ("+y.actions.get("format").shortcut+")",y.actions.get("image"),oa?Editor.formatImage:null)],oa?60:null);ta=t("insert",!0,oa?T:null);I([ta,B(mxResources.get("delete"),y.actions.get("delete").funct,null,mxResources.get("delete"),y.actions.get("delete"),oa?Editor.trashImage:null)],oa?60:null);411<=l&&(I([Oa,Na],60),520<=l&&I([P,640<=l?B("",Da.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",Da,Editor.zoomInImage):null,640<=l?B("",pa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+
+" -)",pa,Editor.zoomOutImage):null],60))}null!=Ea&&(mxEvent.disableContextMenu(Ea),mxEvent.addGestureListeners(Ea,mxUtils.bind(this,function(Fa){(mxEvent.isShiftDown(Fa)||mxEvent.isAltDown(Fa)||mxEvent.isMetaDown(Fa)||mxEvent.isControlDown(Fa)||mxEvent.isPopupTrigger(Fa))&&y.appIconClicked(Fa)}),null,null));ta=y.menus.get("language");null!=ta&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=l&&"1"!=urlParams.embed&&"1"!=urlParams.sketch?(null==Z&&(ta=aa.addMenu("",ta.funct),ta.setAttribute("title",
+"language"),ta.className="geToolbarButton",ta.style.backgroundImage="url("+Editor.globeImage+")",ta.style.backgroundPosition="center center",ta.style.backgroundRepeat="no-repeat",ta.style.backgroundSize="22px 22px",ta.style.position="absolute",ta.style.height="24px",ta.style.width="24px",ta.style.zIndex="1",ta.style.right="8px",ta.style.cursor="pointer",ta.style.top="12px",da.appendChild(ta),Z=ta),y.buttonContainer.style.paddingRight="34px"):(y.buttonContainer.style.paddingRight="4px",null!=Z&&(Z.parentNode.removeChild(Z),
+Z=null))}z.apply(this,arguments);var J=document.createElement("div");J.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";J.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(J);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save()),
+this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=urlParams.sketch&&1E3<=l||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])g(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var y=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==y.embedViewport)mxUtils.fit(this.div);else{var oa=parseInt(this.div.offsetLeft),
+ta=parseInt(this.div.offsetWidth),Ea=y.embedViewport.x+y.embedViewport.width,Fa=parseInt(this.div.offsetTop),Pa=parseInt(this.div.offsetHeight),Ra=y.embedViewport.y+y.embedViewport.height;this.div.style.left=Math.max(y.embedViewport.x,Math.min(oa,Ea-ta))+"px";this.div.style.top=Math.max(y.embedViewport.y,Math.min(Fa,Ra-Pa))+"px";this.div.style.height=Math.min(y.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(y.embedViewport.width,parseInt(this.div.style.width))+
+"px"}};EditorUi.windowed&&("1"==urlParams.sketch||1E3<=l)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),J=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>l||708>J)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));y=this;var ia=y.editor.graph;y.toolbar=this.createToolbar(y.createDiv("geToolbar"));y.defaultLibraryName=
+mxResources.get("untitledLibrary");var da=document.createElement("div");da.className="geMenubarContainer";var ja=null,aa=new Menubar(y,da);y.statusContainer=y.createStatusContainer();y.statusContainer.style.position="relative";y.statusContainer.style.maxWidth="";y.statusContainer.style.marginTop="7px";y.statusContainer.style.marginLeft="6px";y.statusContainer.style.color="gray";y.statusContainer.style.cursor="default";var qa=y.hideCurrentMenu;y.hideCurrentMenu=function(){qa.apply(this,arguments);
+this.editor.graph.popupMenuHandler.hideMenu()};var sa=y.descriptorChanged;y.descriptorChanged=function(){sa.apply(this,arguments);var oa=y.getCurrentFile();if(null!=oa&&null!=oa.getTitle()){var ta=oa.getMode();"google"==ta?ta="googleDrive":"github"==ta?ta="gitHub":"gitlab"==ta?ta="gitLab":"onedrive"==ta&&(ta="oneDrive");ta=mxResources.get(ta);da.setAttribute("title",oa.getTitle()+(null!=ta?" ("+ta+")":""))}else da.removeAttribute("title")};y.setStatusText(y.editor.getStatus());da.appendChild(y.statusContainer);
+y.buttonContainer=document.createElement("div");y.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";da.appendChild(y.buttonContainer);y.menubarContainer=y.buttonContainer;y.tabContainer=document.createElement("div");y.tabContainer.className="geTabContainer";y.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";
+J=y.diagramContainer.parentNode;var L=document.createElement("div");L.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";y.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){L.style.top="20px";y.titlebar=document.createElement("div");y.titlebar.style.cssText="position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var V=document.createElement("div");
+V.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";y.titlebar.appendChild(V);J.appendChild(y.titlebar)}var T="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,Y="1"==urlParams.sketch?document.createElement("div"):null,W="1"==urlParams.sketch?document.createElement("div"):null,ka="1"==urlParams.sketch?document.createElement("div"):null,q=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)ka.style.left=
+"10px",ka.style.top="10px",W.style.left="10px",W.style.top="60px",Y.style.top="10px",Y.style.right="12px",Y.style.left="",y.diagramContainer.setAttribute("data-bounds",y.diagramContainer.style.top+" "+y.diagramContainer.style.left+" "+y.diagramContainer.style.width+" "+y.diagramContainer.style.height),y.diagramContainer.style.top="0px",y.diagramContainer.style.left="0px",y.diagramContainer.style.bottom="0px",y.diagramContainer.style.right="0px",y.diagramContainer.style.width="",y.diagramContainer.style.height=
+"";else{var oa=y.diagramContainer.getAttribute("data-bounds");if(null!=oa){y.diagramContainer.style.background="transparent";y.diagramContainer.removeAttribute("data-bounds");var ta=ia.getGraphBounds();oa=oa.split(" ");y.diagramContainer.style.top=oa[0];y.diagramContainer.style.left=oa[1];y.diagramContainer.style.width=ta.width+50+"px";y.diagramContainer.style.height=ta.height+46+"px";y.diagramContainer.style.bottom="";y.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",
+rect:y.diagramContainer.getBoundingClientRect()}),"*");y.refresh()}ka.style.left=y.diagramContainer.offsetLeft+"px";ka.style.top=y.diagramContainer.offsetTop-ka.offsetHeight-4+"px";W.style.display="";W.style.left=y.diagramContainer.offsetLeft-W.offsetWidth-4+"px";W.style.top=y.diagramContainer.offsetTop+"px";Y.style.left=y.diagramContainer.offsetLeft+y.diagramContainer.offsetWidth-Y.offsetWidth+"px";Y.style.top=ka.style.top;Y.style.right="";y.bottomResizer.style.left=y.diagramContainer.offsetLeft+
+(y.diagramContainer.offsetWidth-y.bottomResizer.offsetWidth)/2+"px";y.bottomResizer.style.top=y.diagramContainer.offsetTop+y.diagramContainer.offsetHeight-y.bottomResizer.offsetHeight/2-1+"px";y.rightResizer.style.left=y.diagramContainer.offsetLeft+y.diagramContainer.offsetWidth-y.rightResizer.offsetWidth/2-1+"px";y.rightResizer.style.top=y.diagramContainer.offsetTop+(y.diagramContainer.offsetHeight-y.bottomResizer.offsetHeight)/2+"px"}y.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":
+"";y.rightResizer.style.visibility=y.bottomResizer.style.visibility;da.style.display="none";ka.style.visibility="";Y.style.visibility=""});V=y.actions.get("fullscreen");var F=B("",V.funct,null,mxResources.get(""),V,Editor.fullscreenImage),S=mxUtils.bind(this,function(){F.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";
+q()});V=mxUtils.bind(this,function(){b(y,!0);y.initFormatWindow();var oa=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(oa.x+oa.width+4,oa.y);S()});y.addListener("inlineFullscreenChanged",S);y.addListener("editInlineStart",V);"1"==urlParams.embedInline&&y.addListener("darkModeChanged",V);y.addListener("editInlineStop",mxUtils.bind(this,function(oa){y.diagramContainer.style.width="10px";y.diagramContainer.style.height="10px";y.diagramContainer.style.border="";y.bottomResizer.style.visibility=
+"hidden";y.rightResizer.style.visibility="hidden";ka.style.visibility="hidden";Y.style.visibility="hidden";W.style.display="none"}));if(null!=y.hoverIcons){var ba=y.hoverIcons.update;y.hoverIcons.update=function(){ia.freehand.isDrawing()||ba.apply(this,arguments)}}if(null!=ia.freehand){var U=ia.freehand.createStyle;ia.freehand.createStyle=function(oa){return U.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){W.className="geToolbarContainer";Y.className="geToolbarContainer";ka.className=
+"geToolbarContainer";da.className="geToolbarContainer";y.picker=W;y.sketchPickerMenuElt=W;var ca=!1;"1"!=urlParams.embed&&"atlassian"!=y.getServiceName()&&(mxEvent.addListener(da,"mouseenter",function(){y.statusContainer.style.display="inline-block"}),mxEvent.addListener(da,"mouseleave",function(){ca||(y.statusContainer.style.display="none")}));var ea=mxUtils.bind(this,function(oa){null!=y.notificationBtn&&(null!=oa?y.notificationBtn.setAttribute("title",oa):y.notificationBtn.removeAttribute("title"))});
+da.style.visibility=20>da.clientWidth?"hidden":"";y.editor.addListener("statusChanged",mxUtils.bind(this,function(){y.setStatusText(y.editor.getStatus());if("1"!=urlParams.embed&&"atlassian"!=y.getServiceName())if(y.statusContainer.style.display="inline-block",ca=!0,1==y.statusContainer.children.length&&""==y.editor.getStatus())da.style.visibility="hidden";else{if(0==y.statusContainer.children.length||1==y.statusContainer.children.length&&"function"===typeof y.statusContainer.firstChild.getAttribute&&
+null==y.statusContainer.firstChild.getAttribute("class")){var oa=null!=y.statusContainer.firstChild&&"function"===typeof y.statusContainer.firstChild.getAttribute?y.statusContainer.firstChild.getAttribute("title"):y.editor.getStatus();ea(oa);var ta=y.getCurrentFile();ta=null!=ta?ta.savingStatusKey:DrawioFile.prototype.savingStatusKey;oa==mxResources.get(ta)+"..."?(y.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(ta))+'..."src="'+Editor.tailSpin+'">',y.statusContainer.style.display=
+"inline-block",ca=!0):6<y.buttonContainer.clientWidth&&(y.statusContainer.style.display="none",ca=!1)}else y.statusContainer.style.display="inline-block",ea(null),ca=!0;da.style.visibility=20>da.clientWidth&&!ca?"hidden":""}}));H=t("diagram",null,Editor.menuImage);H.style.boxShadow="none";H.style.padding="6px";H.style.margin="0px";ka.appendChild(H);mxEvent.disableContextMenu(H);mxEvent.addGestureListeners(H,mxUtils.bind(this,function(oa){(mxEvent.isShiftDown(oa)||mxEvent.isAltDown(oa)||mxEvent.isMetaDown(oa)||
+mxEvent.isControlDown(oa)||mxEvent.isPopupTrigger(oa))&&this.appIconClicked(oa)}),null,null);y.statusContainer.style.position="";y.statusContainer.style.display="none";y.statusContainer.style.margin="0px";y.statusContainer.style.padding="6px 0px";y.statusContainer.style.maxWidth=Math.min(l-240,280)+"px";y.statusContainer.style.display="inline-block";y.statusContainer.style.textOverflow="ellipsis";y.buttonContainer.style.display="inline-block";y.buttonContainer.style.position="relative";y.buttonContainer.style.paddingRight=
+"0px";y.buttonContainer.style.top="0px";var na=document.createElement("a");na.style.padding="0px";na.style.boxShadow="none";na.className="geMenuItem";na.style.display="inline-block";na.style.width="40px";na.style.height="12px";na.style.marginBottom="-2px";na.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";na.style.backgroundPosition="top center";na.style.backgroundRepeat="no-repeat";na.setAttribute("title","Minimize");var ra=!1,ya=mxUtils.bind(this,function(){W.innerText="";if(!ra){var oa=
+function(ta,Ea,Fa,Pa){null!=Ea&&ta.setAttribute("title",Ea);ta.style.cursor=null!=Fa?Fa:"default";ta.style.margin="2px 0px";W.appendChild(ta);mxUtils.br(W);null!=Pa&&(ta.style.position="relative",ta.style.overflow="visible",Ea=document.createElement("div"),Ea.style.position="absolute",Ea.style.left="34px",Ea.style.top="28px",Ea.style.fontSize="8px",mxUtils.write(Ea,Pa),ta.appendChild(Ea));return ta};oa(y.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",
+60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+" (A)",null,"A");oa(y.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");oa(y.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",
+160,80,"",mxResources.get("rectangle")+" (D)",!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");oa(y.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");(function(){var ta=new mxCell("",new mxGeometry(0,0,ia.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");ta.geometry.setTerminalPoint(new mxPoint(0,0),!0);ta.geometry.setTerminalPoint(new mxPoint(ta.geometry.width,
+0),!1);ta.geometry.points=[];ta.geometry.relative=!0;ta.edge=!0;oa(y.sidebar.createEdgeTemplateFromCells([ta],ta.geometry.width,ta.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");ta=ta.clone();ta.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";ta.geometry.width=ia.defaultEdgeLength+20;ta.geometry.setTerminalPoint(new mxPoint(0,20),!0);ta.geometry.setTerminalPoint(new mxPoint(ta.geometry.width,
+20),!1);oa(y.sidebar.createEdgeTemplateFromCells([ta],ta.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"))})();(function(ta,Ea,Fa,Pa){ta=B("",ta.funct,null,Ea,ta,Fa);ta.style.width="40px";ta.style.height="34px";ta.style.opacity="0.7";return oa(ta,null,"pointer",Pa)})(y.actions.get("insertFreehand"),mxResources.get("freehand")+" (X)",Editor.freehandImage,"X");H=t("insert",null,Editor.plusImage);H.style.boxShadow="none";H.style.opacity="0.7";H.style.padding="6px";H.style.margin=
+"0px";H.style.height="34px";H.style.width="37px";oa(H,null,"pointer")}"1"!=urlParams.embedInline&&W.appendChild(na)});mxEvent.addListener(na,"click",mxUtils.bind(this,function(){ra?(mxUtils.setPrefixedStyle(W.style,"transform","translate(0, -50%)"),W.style.padding="8px 6px 4px",W.style.top="50%",W.style.bottom="",W.style.height="",na.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",na.style.width="40px",na.style.height="12px",na.setAttribute("title","Minimize"),ra=!1,ya()):(W.innerText=
+"",W.appendChild(na),mxUtils.setPrefixedStyle(W.style,"transform","translate(0, 0)"),W.style.top="",W.style.bottom="12px",W.style.padding="0px",W.style.height="24px",na.style.height="24px",na.style.backgroundImage="url("+Editor.plusImage+")",na.setAttribute("title",mxResources.get("insert")),na.style.width="24px",ra=!0)}));ya();y.addListener("darkModeChanged",ya);y.addListener("sketchModeChanged",ya)}else y.editor.addListener("statusChanged",mxUtils.bind(this,function(){y.setStatusText(y.editor.getStatus())}));
+V=y.menus.get("viewZoom");if(null!=V){var va=function(oa){if(mxEvent.isAltDown(oa))y.hideCurrentMenu(),y.actions.get("customZoom").funct(),mxEvent.consume(oa);else if("geItem"!=mxEvent.getSource(oa).className||mxEvent.isShiftDown(oa))y.hideCurrentMenu(),y.actions.get("smartFit").funct(),mxEvent.consume(oa)},Da=y.actions.get("zoomIn"),pa=y.actions.get("zoomOut"),Aa=y.actions.get("resetView"),xa=y.actions.get("undo"),Ma=y.actions.get("redo"),Oa=B("",xa.funct,null,mxResources.get("undo")+" ("+xa.shortcut+
+")",xa,Editor.undoImage),Na=B("",Ma.funct,null,mxResources.get("redo")+" ("+Ma.shortcut+")",Ma,Editor.redoImage);if(null!=Y){Aa=function(){x.style.display=null!=y.pages&&("0"!=urlParams.pages||1<y.pages.length||Editor.pagesVisible)?"inline-block":"none"};var La=function(){x.innerText="";if(null!=y.currentPage){mxUtils.write(x,y.currentPage.getName());var oa=null!=y.pages?y.pages.length:1,ta=y.getPageIndex(y.currentPage);ta=null!=ta?ta+1:1;var Ea=y.currentPage.getId();x.setAttribute("title",y.currentPage.getName()+
+" ("+ta+"/"+oa+")"+(null!=Ea?" ["+Ea+"]":""))}},Ba=y.actions.get("delete"),ab=B("",Ba.funct,null,mxResources.get("delete"),Ba,Editor.trashImage);ab.style.opacity="0.3";ka.appendChild(ab);Ba.addListener("stateChanged",function(){ab.style.opacity=Ba.enabled?"":"0.3"});var Xa=function(){Oa.style.display=0<y.editor.undoManager.history.length||ia.isEditing()?"inline-block":"none";Na.style.display=Oa.style.display;Oa.style.opacity=xa.enabled?"":"0.3";Na.style.opacity=Ma.enabled?"":"0.3"};ka.appendChild(Oa);
+ka.appendChild(Na);xa.addListener("stateChanged",Xa);Ma.addListener("stateChanged",Xa);Xa();var x=this.createPageMenuTab(!1,!0);x.style.cssText="display:inline-block;white-space:nowrap;overflow:hidden;padding:6px;cursor:pointer;max-width:160px;text-overflow:ellipsis;";Y.appendChild(x);y.editor.addListener("pagesPatched",La);y.editor.addListener("pageSelected",La);y.editor.addListener("pageRenamed",La);y.editor.addListener("fileLoaded",La);La();y.addListener("fileDescriptorChanged",Aa);y.addListener("pagesVisibleChanged",
+Aa);y.editor.addListener("pagesPatched",Aa);Aa();Aa=B("",pa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",pa,Editor.zoomOutImage);Y.appendChild(Aa);var H=aa.addMenu("100%",V.funct);H.setAttribute("title",mxResources.get("zoom"));H.innerHTML="100%";H.style.display="inline-block";H.style.color="inherit";H.style.cursor="pointer";H.style.textAlign="center";H.style.whiteSpace="nowrap";H.style.paddingRight="10px";H.style.textDecoration="none";H.style.verticalAlign="top";H.style.padding=
+"6px 0";H.style.fontSize="14px";H.style.width="40px";Y.appendChild(H);V=B("",Da.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",Da,Editor.zoomInImage);Y.appendChild(V);"1"==urlParams.embedInline?(Y.appendChild(F),V=y.actions.get("exit"),Y.appendChild(B("",V.funct,null,mxResources.get("exit"),V,Editor.closeImage))):F.parentNode.removeChild(F);y.tabContainer.style.visibility="hidden";da.style.cssText="position:absolute;right:12px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
+ka.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";Y.style.cssText="position:absolute;right:12px;bottom:12px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";L.appendChild(ka);L.appendChild(Y);W.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";
+mxClient.IS_POINTER&&(W.style.touchAction="none");L.appendChild(W);window.setTimeout(function(){mxUtils.setPrefixedStyle(W.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(L)}else{var P=B("",va,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",Aa,Editor.zoomFitImage);da.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";H=aa.addMenu("100%",
+V.funct);H.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");H.style.whiteSpace="nowrap";H.style.paddingRight="10px";H.style.textDecoration="none";H.style.textDecoration="none";H.style.overflow="hidden";H.style.visibility="hidden";H.style.textAlign="center";H.style.cursor="pointer";H.style.height=parseInt(y.tabContainerHeight)-1+"px";H.style.lineHeight=parseInt(y.tabContainerHeight)+1+"px";H.style.position="absolute";H.style.display="block";H.style.fontSize="12px";H.style.width="59px";
+H.style.right="0px";H.style.bottom="0px";H.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";H.style.backgroundPosition="right 6px center";H.style.backgroundRepeat="no-repeat";L.appendChild(H)}(function(oa){mxEvent.addListener(oa,"click",va);var ta=mxUtils.bind(this,function(){oa.innerText="";mxUtils.write(oa,Math.round(100*y.editor.graph.view.scale)+"%")});y.editor.graph.view.addListener(mxEvent.EVENT_SCALE,ta);y.editor.addListener("resetGraphView",ta);y.editor.addListener("pageSelected",
+ta)})(H);var X=y.setGraphEnabled;y.setGraphEnabled=function(){X.apply(this,arguments);null!=this.tabContainer&&(H.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==Y?this.tabContainerHeight+"px":"0px")}}L.appendChild(da);L.appendChild(y.diagramContainer);J.appendChild(L);y.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=l)&&"1"!=urlParams.embedInline&&b(this,!0);null==Y&&L.appendChild(y.tabContainer);
+var Z=null;O();mxEvent.addListener(window,"resize",function(){O();null!=y.sidebarWindow&&y.sidebarWindow.window.fit();null!=y.formatWindow&&y.formatWindow.window.fit();null!=y.actions.outlineWindow&&y.actions.outlineWindow.window.fit();null!=y.actions.layersWindow&&y.actions.layersWindow.window.fit();null!=y.menus.tagsWindow&&y.menus.tagsWindow.window.fit();null!=y.menus.findWindow&&y.menus.findWindow.window.fit();null!=y.menus.findReplaceWindow&&y.menus.findReplaceWindow.window.fit()});if("1"==urlParams.embedInline){document.body.style.cursor=
+"text";W.style.transform="";mxEvent.addGestureListeners(y.diagramContainer.parentNode,function(oa){mxEvent.getSource(oa)==y.diagramContainer.parentNode&&(y.embedExitPoint=new mxPoint(mxEvent.getClientX(oa),mxEvent.getClientY(oa)),y.sendEmbeddedSvgExport())});J=document.createElement("div");J.style.position="absolute";J.style.width="10px";J.style.height="10px";J.style.borderRadius="5px";J.style.border="1px solid gray";J.style.background="#ffffff";J.style.cursor="row-resize";y.diagramContainer.parentNode.appendChild(J);
+y.bottomResizer=J;var fa=null,la=null,za=null,ua=null;mxEvent.addGestureListeners(J,function(oa){ua=parseInt(y.diagramContainer.style.height);la=mxEvent.getClientY(oa);ia.popupMenuHandler.hideMenu();mxEvent.consume(oa)});J=J.cloneNode(!1);J.style.cursor="col-resize";y.diagramContainer.parentNode.appendChild(J);y.rightResizer=J;mxEvent.addGestureListeners(J,function(oa){za=parseInt(y.diagramContainer.style.width);fa=mxEvent.getClientX(oa);ia.popupMenuHandler.hideMenu();mxEvent.consume(oa)});mxEvent.addGestureListeners(document.body,
+null,function(oa){var ta=!1;null!=fa&&(y.diagramContainer.style.width=Math.max(20,za+mxEvent.getClientX(oa)-fa)+"px",ta=!0);null!=la&&(y.diagramContainer.style.height=Math.max(20,ua+mxEvent.getClientY(oa)-la)+"px",ta=!0);ta&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:y.diagramContainer.getBoundingClientRect()}),"*"),q(),y.refresh())},function(oa){null==fa&&null==la||mxEvent.consume(oa);la=fa=null});this.diagramContainer.style.borderRadius=
+"4px";document.body.style.backgroundColor="transparent";y.bottomResizer.style.visibility="hidden";y.rightResizer.style.visibility="hidden";ka.style.visibility="hidden";Y.style.visibility="hidden";W.style.display="none"}"1"==urlParams.prefetchFonts&&y.editor.loadFonts()}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var d=EditorUi.initTheme;EditorUi.initTheme=function(){d.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,d,g,l,D,p,E){this.file=b;this.id=d;this.content=g;this.modifiedDate=l;this.createdDate=D;this.isResolved=p;this.user=E;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,d,g,l,D){d()};DrawioComment.prototype.editComment=function(b,d,g){d()};DrawioComment.prototype.deleteComment=function(b,d){b()};DrawioUser=function(b,d,g,l,D){this.id=b;this.email=d;this.displayName=g;this.pictureUrl=l;this.locale=D};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About\naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nbeta=beta\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\nrealtimeCollaboration=Real-Time Collaboration\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedFonts=Embed Fonts\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified.\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngetNotionChromeExtension=Get the Notion Chrome Extension\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlabels=Labels\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save.\nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunmerge=Unmerge\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found\nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\nconfDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?\nconfDraftTooBigErr=Draft size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration?\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\npathFilename=Path/Filename\nconfAHugeInstances=Very Large Instances\nconfAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to request the current instance pages list from Atlassian. Please contact our support for more details.\nchoosePageIDsFile=Choose current page IDs csv file\nchooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file\nprivate=Private\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
+Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-style2"];GraphViewer=function(b,d,g){this.init(b,d,g)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl="https://viewer.diagrams.net/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?24:26;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!1;GraphViewer.prototype.autoCrop=!1;
GraphViewer.prototype.autoOrigin=!0;GraphViewer.prototype.center=!1;GraphViewer.prototype.forceCenter=!1;GraphViewer.prototype.allowZoomIn=!1;GraphViewer.prototype.allowZoomOut=!0;GraphViewer.prototype.showTitleAsTooltip=!1;GraphViewer.prototype.checkVisibleState=!0;GraphViewer.prototype.minHeight=28;GraphViewer.prototype.minWidth=100;GraphViewer.prototype.responsive=!1;
-GraphViewer.prototype.init=function(b,e,k){this.graphConfig=null!=k?k:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.autoCrop=null!=this.graphConfig["auto-crop"]?this.graphConfig["auto-crop"]:this.autoCrop;this.autoOrigin=null!=this.graphConfig["auto-origin"]?this.graphConfig["auto-origin"]:this.autoOrigin;this.allowZoomOut=null!=this.graphConfig["allow-zoom-out"]?this.graphConfig["allow-zoom-out"]:this.allowZoomOut;this.allowZoomIn=null!=this.graphConfig["allow-zoom-in"]?
+GraphViewer.prototype.init=function(b,d,g){this.graphConfig=null!=g?g:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.autoCrop=null!=this.graphConfig["auto-crop"]?this.graphConfig["auto-crop"]:this.autoCrop;this.autoOrigin=null!=this.graphConfig["auto-origin"]?this.graphConfig["auto-origin"]:this.autoOrigin;this.allowZoomOut=null!=this.graphConfig["allow-zoom-out"]?this.graphConfig["allow-zoom-out"]:this.allowZoomOut;this.allowZoomIn=null!=this.graphConfig["allow-zoom-in"]?
this.graphConfig["allow-zoom-in"]:this.allowZoomIn;this.forceCenter=null!=this.graphConfig.forceCenter?this.graphConfig.forceCenter:this.forceCenter;this.center=null!=this.graphConfig.center?this.graphConfig.center:this.center||this.forceCenter;this.checkVisibleState=null!=this.graphConfig["check-visible-state"]?this.graphConfig["check-visible-state"]:this.checkVisibleState;this.toolbarItems=null!=this.graphConfig.toolbar?this.graphConfig.toolbar.split(" "):[];this.zoomEnabled=0<=mxUtils.indexOf(this.toolbarItems,
"zoom");this.layersEnabled=0<=mxUtils.indexOf(this.toolbarItems,"layers");this.tagsEnabled=0<=mxUtils.indexOf(this.toolbarItems,"tags");this.lightboxEnabled=0<=mxUtils.indexOf(this.toolbarItems,"lightbox");this.lightboxClickEnabled=0!=this.graphConfig.lightbox;this.initialOverflow=document.body.style.overflow;this.initialWidth=null!=b?b.style.width:null;this.widthIsEmpty=null!=this.initialWidth?""==this.initialWidth:!0;this.currentPage=parseInt(this.graphConfig.page)||0;this.responsive=(null!=this.graphConfig.responsive?
-this.graphConfig.responsive:this.responsive)&&!this.zoomEnabled&&!mxClient.NO_FO&&!mxClient.IS_SF;this.pageId=this.graphConfig.pageId;this.editor=null;"inline"==this.graphConfig["toolbar-position"]&&(this.minHeight+=this.toolbarHeight);if(null!=e&&(this.xmlDocument=e.ownerDocument,this.xmlNode=e,this.xml=mxUtils.getXml(e),null!=b)){var m=mxUtils.bind(this,function(){this.graph=new Graph(b);this.graph.enableFlowAnimation=!0;this.graph.defaultPageBackgroundColor="transparent";this.graph.transparentBackground=
-!1;if(this.responsive&&this.graph.dialect==mxConstants.DIALECT_SVG){var F=this.graph.view.getDrawPane().ownerSVGElement;this.graph.view.getCanvas();null!=this.graphConfig.border?F.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(F.style.padding="8px");F.style.boxSizing="border-box";F.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var G=this.view.graphBounds,D=this.view.translate;F.setAttribute("viewBox",G.x+D.x-this.panDx+" "+(G.y+D.y-this.panDy)+
-" "+(G.width+1)+" "+(G.height+1));this.container.style.backgroundColor=F.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",G))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(G){return!0});this.lightboxClickEnabled&&(b.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==
-this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");this.xmlNode=this.editor.extractGraphModel(this.xmlNode,!0);this.xmlNode!=e&&(this.xml=mxUtils.getXml(this.xmlNode),this.xmlDocument=this.xmlNode.ownerDocument);var L=this;this.graph.getImageFromBundles=function(G){return L.getImageUrl(G)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var P=this.xmlNode.getElementsByTagName("diagram");if(0<
-P.length){if(null!=this.pageId)for(var d=0;d<P.length;d++)if(this.pageId==P[d].getAttribute("id")){this.currentPage=d;break}var f=this.graph.getGlobalVariable;L=this;this.graph.getGlobalVariable=function(G){var D=P[L.currentPage];return"page"==G?D.getAttribute("name")||"Page-"+(L.currentPage+1):"pagenumber"==G?L.currentPage+1:"pagecount"==G?P.length:f.apply(this,arguments)}}}this.diagrams=[];var g=null;this.selectPage=function(G){this.handlingResize||(this.currentPage=mxUtils.mod(G,this.diagrams.length),
-this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(G){G=this.getIndexById(G);var D=0<=G;D&&this.selectPage(G);return D};d=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=g&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),g=this.xmlNode)});var x=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(G){if(null!=G&&Graph.isPageLink(G.src)){var D=G.src,
-I=D.indexOf(",");0<I&&(I=L.getIndexById(D.substring(I+1)),0<=I&&(G=L.getImageForGraphModel(Editor.parseDiagramNode(L.diagrams[I])),G.originalSrc=D))}x.apply(this,arguments)};var y=this.graph.getGraphBounds;this.graph.getGraphBounds=function(G){var D=y.apply(this,arguments);G=this.backgroundImage;if(null!=G){var I=this.view.translate,H=this.view.scale;D=mxRectangle.fromRectangle(D);D.add(new mxRectangle((I.x+G.x)*H,(I.y+G.y)*H,G.width*H,G.height*H))}return D};this.addListener("xmlNodeChanged",d);d();
-urlParams.page=L.currentPage;d=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,d=this.setLayersVisible(),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.graph.panningHandler.isForcePanningEvent=function(G){return!mxEvent.isPopupTrigger(G.getEvent())&&"auto"==this.graph.container.style.overflow},
+this.graphConfig.responsive:this.responsive)&&!this.zoomEnabled&&!mxClient.NO_FO&&!mxClient.IS_SF;this.pageId=this.graphConfig.pageId;this.editor=null;"inline"==this.graphConfig["toolbar-position"]&&(this.minHeight+=this.toolbarHeight);if(null!=d&&(this.xmlDocument=d.ownerDocument,this.xmlNode=d,this.xml=mxUtils.getXml(d),null!=b)){var l=mxUtils.bind(this,function(){this.graph=new Graph(b);this.graph.enableFlowAnimation=!0;this.graph.defaultPageBackgroundColor="transparent";this.graph.transparentBackground=
+!1;if(this.responsive&&this.graph.dialect==mxConstants.DIALECT_SVG){var E=this.graph.view.getDrawPane().ownerSVGElement;this.graph.view.getCanvas();null!=this.graphConfig.border?E.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(E.style.padding="8px");E.style.boxSizing="border-box";E.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var z=this.view.graphBounds,t=this.view.translate;E.setAttribute("viewBox",z.x+t.x-this.panDx+" "+(z.y+t.y-this.panDy)+
+" "+(z.width+1)+" "+(z.height+1));this.container.style.backgroundColor=E.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",z))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(z){return!0});this.lightboxClickEnabled&&(b.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==
+this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");this.xmlNode=this.editor.extractGraphModel(this.xmlNode,!0);this.xmlNode!=d&&(this.xml=mxUtils.getXml(this.xmlNode),this.xmlDocument=this.xmlNode.ownerDocument);var N=this;this.graph.getImageFromBundles=function(z){return N.getImageUrl(z)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var R=this.xmlNode.getElementsByTagName("diagram");if(0<
+R.length){if(null!=this.pageId)for(var G=0;G<R.length;G++)if(this.pageId==R[G].getAttribute("id")){this.currentPage=G;break}var M=this.graph.getGlobalVariable;N=this;this.graph.getGlobalVariable=function(z){var t=R[N.currentPage];return"page"==z?t.getAttribute("name")||"Page-"+(N.currentPage+1):"pagenumber"==z?N.currentPage+1:"pagecount"==z?R.length:M.apply(this,arguments)}}}this.diagrams=[];var Q=null;this.selectPage=function(z){this.handlingResize||(this.currentPage=mxUtils.mod(z,this.diagrams.length),
+this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(z){z=this.getIndexById(z);var t=0<=z;t&&this.selectPage(z);return t};G=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=Q&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),Q=this.xmlNode)});var e=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(z){if(null!=z&&Graph.isPageLink(z.src)){var t=z.src,
+B=t.indexOf(",");0<B&&(B=N.getIndexById(t.substring(B+1)),0<=B&&(z=N.getImageForGraphModel(Editor.parseDiagramNode(N.diagrams[B])),z.originalSrc=t))}e.apply(this,arguments)};var f=this.graph.getGraphBounds;this.graph.getGraphBounds=function(z){var t=f.apply(this,arguments);z=this.backgroundImage;if(null!=z){var B=this.view.translate,I=this.view.scale;t=mxRectangle.fromRectangle(t);t.add(new mxRectangle((B.x+z.x)*I,(B.y+z.y)*I,z.width*I,z.height*I))}return t};this.addListener("xmlNodeChanged",G);G();
+urlParams.page=N.currentPage;G=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,G=this.setLayersVisible(),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.graph.panningHandler.isForcePanningEvent=function(z){return!mxEvent.isPopupTrigger(z.getEvent())&&"auto"==this.graph.container.style.overflow},
this.graph.panningHandler.useLeftButtonForPanning=!0,this.graph.panningHandler.ignoreCell=!0,this.graph.panningHandler.usePopupTrigger=!1,this.graph.panningHandler.pinchEnabled=!1);this.graph.setPanning(!1);null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&b.setAttribute("title",this.graphConfig.title);this.responsive||this.addSizeHandler();!this.showLayers(this.graph)||this.forceCenter||this.layersEnabled&&!this.autoCrop||this.crop();this.addClickHandler(this.graph);
-this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=d&&this.setLayersVisible(d);this.graph.customLinkClicked=function(G){if(Graph.isPageLink(G)){var D=G.indexOf(",");L.selectPageById(G.substring(D+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(G);return!0};var t=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,function(){this.treeCellFolded=
-!0;return t.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});k=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==b.offsetWidth&&"undefined"!==typeof k){var C=this.getObservableParent(b),p=new k(mxUtils.bind(this,function(F){0<b.offsetWidth&&(p.disconnect(),m())}));p.observe(C,{attributes:!0})}else m()}};
+this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=G&&this.setLayersVisible(G);this.graph.customLinkClicked=function(z){if(Graph.isPageLink(z)){var t=z.indexOf(",");N.selectPageById(z.substring(t+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(z);return!0};var k=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,function(){this.treeCellFolded=
+!0;return k.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});g=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==b.offsetWidth&&"undefined"!==typeof g){var D=this.getObservableParent(b),p=new g(mxUtils.bind(this,function(E){0<b.offsetWidth&&(p.disconnect(),l())}));p.observe(D,{attributes:!0})}else l()}};
GraphViewer.prototype.getObservableParent=function(b){for(b=b.parentNode;b!=document.body&&null!=b.parentNode&&"none"!==mxUtils.getCurrentStyle(b).display;)b=b.parentNode;return b};GraphViewer.prototype.getImageUrl=function(b){null!=b&&"http://"!=b.substring(0,7)&&"https://"!=b.substring(0,8)&&"data:image"!=b.substring(0,10)&&("/"==b.charAt(0)&&(b=b.substring(1,b.length)),b=this.imageBaseUrl+b);return b};
-GraphViewer.prototype.getImageForGraphModel=function(b){var e=Graph.createOffscreenGraph(this.graph.getStylesheet());e.getGlobalVariable=this.graph.getGlobalVariable;document.body.appendChild(e.container);b=(new mxCodec(b.ownerDocument)).decode(b).root;e.model.setRoot(b);b=e.getSvg();var k=e.getGraphBounds();document.body.removeChild(e.container);return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(b)),k.width,k.height,k.x,k.y)};
-GraphViewer.prototype.getIndexById=function(b){if(null!=this.diagrams)for(var e=0;e<this.diagrams.length;e++)if(this.diagrams[e].getAttribute("id")==b)return e;return-1};GraphViewer.prototype.setXmlNode=function(b){b=this.editor.extractGraphModel(b,!0);this.xmlDocument=b.ownerDocument;this.xml=mxUtils.getXml(b);this.xmlNode=b;this.updateGraphXml(b);this.fireEvent(new mxEventObject("xmlNodeChanged"))};
+GraphViewer.prototype.getImageForGraphModel=function(b){var d=Graph.createOffscreenGraph(this.graph.getStylesheet());d.getGlobalVariable=this.graph.getGlobalVariable;document.body.appendChild(d.container);b=(new mxCodec(b.ownerDocument)).decode(b).root;d.model.setRoot(b);b=d.getSvg();var g=d.getGraphBounds();document.body.removeChild(d.container);return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(b)),g.width,g.height,g.x,g.y)};
+GraphViewer.prototype.getIndexById=function(b){if(null!=this.diagrams)for(var d=0;d<this.diagrams.length;d++)if(this.diagrams[d].getAttribute("id")==b)return d;return-1};GraphViewer.prototype.setXmlNode=function(b){b=this.editor.extractGraphModel(b,!0);this.xmlDocument=b.ownerDocument;this.xml=mxUtils.getXml(b);this.xmlNode=b;this.updateGraphXml(b);this.fireEvent(new mxEventObject("xmlNodeChanged"))};
GraphViewer.prototype.setFileNode=function(b){null==this.xmlNode&&(this.xmlDocument=b.ownerDocument,this.xml=mxUtils.getXml(b),this.xmlNode=b);this.setGraphXml(b)};GraphViewer.prototype.updateGraphXml=function(b){this.setGraphXml(b);this.fireEvent(new mxEventObject("graphChanged"))};
-GraphViewer.prototype.setLayersVisible=function(b){var e=!0;if(!this.autoOrigin){var k=[],m=this.graph.getModel();m.beginUpdate();try{for(var C=0;C<m.getChildCount(m.root);C++){var p=m.getChildAt(m.root,C);e=e&&m.isVisible(p);k.push(m.isVisible(p));m.setVisible(p,null!=b?b[C]:!0)}}finally{m.endUpdate()}}return e?null:k};
-GraphViewer.prototype.setGraphXml=function(b){if(null!=this.graph){this.graph.view.translate=new mxPoint;this.graph.view.scale=1;var e=null;this.graph.getModel().beginUpdate();try{this.graph.getModel().clear(),this.editor.setGraphXml(b),e=this.setLayersVisible(!0)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.widthIsEmpty?(this.graph.container.style.width="",this.graph.container.style.height=""):this.graph.container.style.width=this.initialWidth,this.positionGraph());this.graph.initialViewState=
-{translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};e&&this.setLayersVisible(e)}};
-GraphViewer.prototype.addSizeHandler=function(){var b=this.graph.container,e=this.graph.getGraphBounds(),k=!1;b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var m=mxUtils.bind(this,function(){if(!k){k=!0;var L=this.graph.getGraphBounds();b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?L.width+2*this.graph.border>b.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){L=b.getBoundingClientRect();var P=mxUtils.getScrollOrigin(document.body);
-P="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-P.x,top:-P.y};L={left:L.left-P.left,top:L.top-P.top,bottom:L.bottom-P.top,right:L.right-P.left};this.toolbar.style.left=L.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=L.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px",this.toolbar.style.top=L.top+1+"px"):this.toolbar.style.top=L.top+"px"}else null!=
-this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px");this.treeCellFolded&&(this.treeCellFolded=!1,this.positionGraph(this.graph.view.translate),this.graph.initialViewState.translate=this.graph.view.translate.clone());k=!1}}),C=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(L){var P=b.offsetWidth;P==C||this.handlingResize||(this.handlingResize=!0,"auto"==b.style.overflow&&(b.style.overflow="hidden"),this.graph.maxFitScale=null!=L?L:this.graphConfig.zoom||
-(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=b.style.height)&&this.graph.center(),this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,this.graph.getGraphBounds().height+2*this.graph.border+1)),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},C=P,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=C=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 F=mxUtils.bind(this,function(L){var P=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var d=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==L&&this.allowZoomOut&&(this.allowZoomIn||e.width+2*this.graph.border>b.offsetWidth||e.height+2*this.graph.border>d)?(L=null,null!=d&&e.height+2*this.graph.border>d-2&&(L=(d-2*this.graph.border-2)/e.height),this.fitGraph(L)):this.widthIsEmpty||
-null!=L||0!=this.graphConfig.resize||""==b.style.height?(L=null!=L?L:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-e.x/this.graph.view.scale)+L.x,Math.floor(this.graph.border-e.y/this.graph.view.scale)+L.y),C=b.offsetWidth):this.graph.center((!this.widthIsEmpty||e.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=P});8==document.documentMode?window.setTimeout(F,0):F();this.positionGraph=function(L){e=this.graph.getGraphBounds();C=null;F(L)}};
-GraphViewer.prototype.crop=function(){var b=this.graph,e=b.getGraphBounds(),k=b.border,m=b.view.scale;b.view.setTranslate(null!=e.x?Math.floor(b.view.translate.x-e.x/m+k):k,null!=e.y?Math.floor(b.view.translate.y-e.y/m+k):k)};GraphViewer.prototype.updateContainerWidth=function(b,e){b.style.width=e+"px"};GraphViewer.prototype.updateContainerHeight=function(b,e){if(this.forceCenter||this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||8==document.documentMode)b.style.height=e+"px"};
-GraphViewer.prototype.showLayers=function(b,e){var k=this.graphConfig.layers;k=null!=k&&0<k.length?k.split(" "):[];var m=this.graphConfig.layerIds,C=null!=m&&0<m.length,p=!1;if(0<k.length||C||null!=e){e=null!=e?e.getModel():null;b=b.getModel();b.beginUpdate();try{var F=b.getChildCount(b.root);if(null==e){e=!1;p={};if(C)for(var L=0;L<m.length;L++){var P=b.getCell(m[L]);null!=P&&(e=!0,p[P.id]=!0)}else for(L=0;L<k.length;L++)P=b.getChildAt(b.root,parseInt(k[L])),null!=P&&(e=!0,p[P.id]=!0);for(L=0;e&&
-L<F;L++)P=b.getChildAt(b.root,L),b.setVisible(P,p[P.id]||!1)}else for(L=0;L<F;L++)b.setVisible(b.getChildAt(b.root,L),e.isVisible(e.getChildAt(e.root,L)))}finally{b.endUpdate()}p=!0}return p};
-GraphViewer.prototype.addToolbar=function(){var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var e=b.ownerDocument.createElement("div");e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box";e.style.whiteSpace="nowrap";e.style.textAlign="left";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee";
-e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var k=null,m=null,C=mxUtils.bind(this,function(ra){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=m&&(window.clearTimeout(m),fadeThead2=null);k=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,0);k=null;m=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";
-m=null}),100)}),ra||200)}),p=mxUtils.bind(this,function(ra){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=m&&(window.clearTimeout(m),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,ra||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(ra){mxEvent.isTouchEvent(ra)||(p(30),C())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove":"mousemove",function(ra){mxEvent.consume(ra)});mxEvent.addListener(e,"mouseenter",
-mxUtils.bind(this,function(ra){p(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(ra){p(100);mxEvent.consume(ra)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(ra){mxEvent.isTouchEvent(ra)||p(30)}));var F=this.graph,L=F.getTolerance();F.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ra,ba){this.startX=ba.getGraphX();this.startY=ba.getGraphY();this.scrollLeft=F.container.scrollLeft;this.scrollTop=F.container.scrollTop},mouseMove:function(ra,
-ba){},mouseUp:function(ra,ba){mxEvent.isTouchEvent(ba.getEvent())&&Math.abs(this.scrollLeft-F.container.scrollLeft)<L&&Math.abs(this.scrollTop-F.container.scrollTop)<L&&Math.abs(this.startX-ba.getGraphX())<L&&Math.abs(this.startY-ba.getGraphY())<L&&(0<parseFloat(e.style.opacity||0)?C():p(30))}})}for(var P=this.toolbarItems,d=0,f=mxUtils.bind(this,function(ra,ba,oa,na){ra=this.createToolbarButton(ra,ba,oa,na);e.appendChild(ra);d++;return ra}),g=null,x=null,y=null,t=null,G=0;G<P.length;G++){var D=P[G];
-if("pages"==D){t=b.ownerDocument.createElement("div");t.style.cssText="display:inline-block;position:relative;top:5px;padding:0 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;;cursor:default;";mxUtils.setOpacity(t,70);var I=f(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");I.style.borderRightStyle="none";I.style.paddingLeft="0px";I.style.paddingRight="0px";e.appendChild(t);var H=f(mxUtils.bind(this,
-function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");H.style.paddingLeft="0px";H.style.paddingRight="0px";D=mxUtils.bind(this,function(){t.innerText="";mxUtils.write(t,this.currentPage+1+" / "+this.diagrams.length);t.style.display=1<this.diagrams.length?"inline-block":"none";I.style.display=t.style.display;H.style.display=t.style.display});this.addListener("graphChanged",D);D()}else if("zoom"==D)this.zoomEnabled&&(f(mxUtils.bind(this,function(){this.graph.zoomOut()}),
-Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),f(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),f(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"==D){if(this.layersEnabled){var S=this.graph.getModel(),T=f(mxUtils.bind(this,function(ra){if(null!=
-g)g.parentNode.removeChild(g),g=null;else{g=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var oa=this.graph.getGraphBounds(),na=this.graph.view;0>oa.x||0>oa.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:na.translate.clone(),scale:na.scale}):null!=this.graph.originalViewState&&0<oa.x/na.scale+this.graph.originalViewState.translate.x-na.translate.x&&0<oa.y/na.scale+this.graph.originalViewState.translate.y-
-na.translate.y&&(na.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:na.translate.clone(),scale:na.scale})}}));mxEvent.addListener(g,"mouseleave",function(){g.parentNode.removeChild(g);g=null});ra=T.getBoundingClientRect();g.style.width="140px";g.style.padding="2px 0px 2px 0px";g.style.border="1px solid #d0d0d0";g.style.backgroundColor="#eee";g.style.fontFamily=Editor.defaultHtmlFont;
-g.style.fontSize="11px";g.style.overflowY="auto";g.style.maxHeight=this.graph.container.clientHeight-this.toolbarHeight-10+"px";g.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(g,80);var ba=mxUtils.getDocumentScrollOrigin(document);g.style.left=ba.x+ra.left-1+"px";g.style.top=ba.y+ra.bottom-2+"px";document.body.appendChild(g)}}),Editor.layersImage,mxResources.get("layers")||"Layers");S.addListener(mxEvent.CHANGE,function(){T.style.display=1<S.getChildCount(S.root)?"inline-block":"none"});T.style.display=
-1<S.getChildCount(S.root)?"inline-block":"none"}}else if("tags"==D){if(this.tagsEnabled){var M=f(mxUtils.bind(this,function(ra){null==x&&(x=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),x.div.getElementsByTagName("div")[0].style.position="",x.div.style.maxHeight="160px",x.div.style.maxWidth="120px",x.div.style.padding="2px",x.div.style.overflow="auto",x.div.style.height="auto",x.div.style.position="fixed",x.div.style.fontFamily=Editor.defaultHtmlFont,x.div.style.fontSize="11px",
-x.div.style.backgroundColor="#eee",x.div.style.color="#000",x.div.style.border="1px solid #d0d0d0",x.div.style.zIndex=this.toolbarZIndex+1,mxUtils.setOpacity(x.div,80));if(null!=y)y.parentNode.removeChild(y),y=null;else{y=x.div;mxEvent.addListener(y,"mouseleave",function(){y.parentNode.removeChild(y);y=null});ra=M.getBoundingClientRect();var ba=mxUtils.getDocumentScrollOrigin(document);y.style.left=ba.x+ra.left-1+"px";y.style.top=ba.y+ra.bottom-2+"px";document.body.appendChild(y);x.refresh()}}),Editor.tagsImage,
-mxResources.get("tags")||"Tags");S.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){M.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}));M.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}}else"lightbox"==D?this.lightboxEnabled&&f(mxUtils.bind(this,function(){this.showLightbox()}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(D=this.graphConfig["toolbar-buttons"][D],null!=D&&(D.elem=f(null==
-D.enabled||D.enabled?D.handler:function(){},D.image,D.title,D.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*d);null!=this.graphConfig.title&&(P=b.ownerDocument.createElement("div"),P.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",P.setAttribute("title",this.graphConfig.title),mxUtils.write(P,this.graphConfig.title),mxUtils.setOpacity(P,70),
-e.appendChild(P),this.filename=P);this.minToolbarWidth=34*d;var fa=b.style.border,la=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 ra=b.getBoundingClientRect(),ba=mxUtils.getScrollOrigin(document.body);ba="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-ba.x,top:-ba.y};ra={left:ra.left-
-ba.left,top:ra.top-ba.top,bottom:ra.bottom-ba.top,right:ra.right-ba.left};e.style.left=ra.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=ra.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=ra.top+1+"px"):e.style.top=ra.top+"px";"1px solid transparent"==fa&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var oa=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=
-g&&(g.parentNode.removeChild(g),g=null);b.style.border=fa});mxEvent.addListener(document,"mousemove",function(na){for(na=mxEvent.getSource(na);null!=na;){if(na==b||na==e||na==g)return;na=na.parentNode}oa()});mxEvent.addListener(document.body,"mouseleave",function(na){oa()})}else e.style.top=-this.toolbarHeight+"px",b.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",la):la();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=
-e.parentNode&&la()})).observe(b)};
-GraphViewer.prototype.createToolbarButton=function(b,e,k,m){var C=document.createElement("div");C.style.borderRight="1px solid #d0d0d0";C.style.padding="3px 6px 3px 6px";mxEvent.addListener(C,"click",b);null!=k&&C.setAttribute("title",k);C.style.display="inline-block";b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",e);b.style.width="18px";null==m||m?(mxEvent.addListener(C,"mouseenter",function(){C.style.backgroundColor="#ddd"}),mxEvent.addListener(C,"mouseleave",
-function(){C.style.backgroundColor="#eee"}),mxUtils.setOpacity(b,60),C.style.cursor="pointer"):mxUtils.setOpacity(C,30);C.appendChild(b);return C};GraphViewer.prototype.disableButton=function(b){var e=this.graphConfig["toolbar-buttons"]?this.graphConfig["toolbar-buttons"][b]:null;null!=e&&(mxUtils.setOpacity(e.elem,30),mxEvent.removeListener(e.elem,"click",e.handler),mxEvent.addListener(e.elem,"mouseenter",function(){e.elem.style.backgroundColor="#eee"}))};
-GraphViewer.prototype.addClickHandler=function(b,e){b.linkPolicy=this.graphConfig.target||b.linkPolicy;b.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(k,m){if(null==m)for(var C=mxEvent.getSource(k);C!=b.container&&null!=C&&null==m;)"a"==C.nodeName.toLowerCase()&&(m=C.getAttribute("href")),C=C.parentNode;null!=e?null==m||b.isCustomLink(m)?mxEvent.consume(k):b.isExternalProtocol(m)||b.isBlankLink(m)||window.setTimeout(function(){e.destroy()},0):null!=m&&null==e&&b.isCustomLink(m)&&
-(mxEvent.isTouchEvent(k)||!mxEvent.isPopupTrigger(k))&&b.customLinkClicked(m)&&(mxUtils.clearSelection(),mxEvent.consume(k))}),mxUtils.bind(this,function(k){null!=e||!this.lightboxClickEnabled||mxEvent.isTouchEvent(k)&&0!=this.toolbarItems.length||this.showLightbox()}))};
-GraphViewer.prototype.showLightbox=function(b,e,k){if("open"==this.graphConfig.lightbox||window.self!==window.top)if(null==this.lightboxWindow||this.lightboxWindow.closed){b=null!=b?b:null!=this.graphConfig.editable?this.graphConfig.editable:!0;k={client:1,target:null!=k?k:"blank"};b&&(k.edit=this.graphConfig.edit||"_blank");if(null!=e?e:1)k.close=1;this.layersEnabled&&(k.layers=1);this.tagsEnabled&&(k.tags={});null!=this.graphConfig&&0!=this.graphConfig.nav&&(k.nav=1);null!=this.graphConfig&&null!=
-this.graphConfig.highlight&&(k.highlight=this.graphConfig.highlight.substring(1));null!=this.currentPage&&0<this.currentPage&&(k.page=this.currentPage);"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)?null==this.lightboxWindow&&mxEvent.addListener(window,"message",mxUtils.bind(this,function(m){"ready"==m.data&&m.source==this.lightboxWindow&&this.lightboxWindow.postMessage(this.xml,"*")})):k.data=encodeURIComponent(this.xml);"1"==urlParams.dev&&(k.dev=
-"1");this.lightboxWindow=window.open(("1"!=urlParams.dev?EditorUi.lightboxHost:"https://test.draw.io")+"/#P"+encodeURIComponent(JSON.stringify(k)))}else this.lightboxWindow.focus();else this.showLocalLightbox()};
-GraphViewer.prototype.showLocalLightbox=function(){mxUtils.getDocumentScrollOrigin(document);var b=document.createElement("div");b.style.cssText="position:fixed;top:0;left:0;bottom:0;right:0;";b.style.zIndex=this.lightboxZIndex;b.style.backgroundColor="#000000";mxUtils.setOpacity(b,70);document.body.appendChild(b);var e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("src",Editor.closeBlackImage);e.style.cssText="position:fixed;top:32px;right:32px;";e.style.cursor="pointer";
-mxEvent.addListener(e,"click",function(){m.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;urlParams["page-id"]=this.graphConfig.pageId;urlParams["layer-ids"]=null!=this.graphConfig.layerIds&&0<this.graphConfig.layerIds.length?this.graphConfig.layerIds.join(" "):null;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=this.layersEnabled?"1":"0";this.tagsEnabled&&(urlParams.tags="{}");if(null==document.documentMode||10<=document.documentMode)Editor.prototype.editButtonLink=
-this.graphConfig.edit,Editor.prototype.editButtonFunc=this.graphConfig.editFunc;EditorUi.prototype.updateActionStates=function(){};EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};var k=Graph.prototype.shadowId;Graph.prototype.shadowId="lightboxDropShadow";var m=new EditorUi(new Editor(!0),document.createElement("div"),!0);m.editor.editBlankUrl=this.editBlankUrl;m.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=k;
-m.refresh=function(){};var C=mxUtils.bind(this,function(g){27==g.keyCode&&m.destroy()}),p=this.initialOverflow,F=m.destroy;m.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",C);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow=p;GraphViewer.resizeSensorEnabled=!0;F.apply(this,arguments)};var L=m.editor.graph,P=L.container;P.style.overflow="hidden";this.lightboxChrome?(P.style.border="1px solid #c0c0c0",P.style.margin="40px",mxEvent.addListener(document.documentElement,
-"keydown",C)):(b.style.display="none",e.style.display="none");var d=this;L.getImageFromBundles=function(g){return d.getImageUrl(g)};var f=m.createTemporaryGraph;m.createTemporaryGraph=function(){var g=f.apply(this,arguments);g.getImageFromBundles=function(x){return d.getImageUrl(x)};return g};this.graphConfig.move&&(L.isMoveCellsEvent=function(g){return!0});mxUtils.setPrefixedStyle(P.style,"border-radius","4px");P.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow=
-"hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(P.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(P.style,"transition","all .25s ease-in-out"));this.addClickHandler(L,m);window.setTimeout(mxUtils.bind(this,function(){P.style.outline="none";P.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(P);document.body.appendChild(e);m.setFileData(this.xml);mxUtils.setPrefixedStyle(P.style,"transform","rotateY(0deg)");m.chromelessToolbar.style.bottom=
-"60px";m.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(m.chromelessToolbar);m.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});m.lightboxFit();m.chromelessResize();this.showLayers(L,this.graph);mxEvent.addListener(b,"click",function(){m.destroy()})}),0);return m};
+GraphViewer.prototype.setLayersVisible=function(b){var d=!0;if(!this.autoOrigin){var g=[],l=this.graph.getModel();l.beginUpdate();try{for(var D=0;D<l.getChildCount(l.root);D++){var p=l.getChildAt(l.root,D);d=d&&l.isVisible(p);g.push(l.isVisible(p));l.setVisible(p,null!=b?b[D]:!0)}}finally{l.endUpdate()}}return d?null:g};
+GraphViewer.prototype.setGraphXml=function(b){if(null!=this.graph){this.graph.view.translate=new mxPoint;this.graph.view.scale=1;var d=null;this.graph.getModel().beginUpdate();try{this.graph.getModel().clear(),this.editor.setGraphXml(b),d=this.setLayersVisible(!0)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.widthIsEmpty?(this.graph.container.style.width="",this.graph.container.style.height=""):this.graph.container.style.width=this.initialWidth,this.positionGraph());this.graph.initialViewState=
+{translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};d&&this.setLayersVisible(d)}};
+GraphViewer.prototype.addSizeHandler=function(){var b=this.graph.container,d=this.graph.getGraphBounds(),g=!1;b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var l=mxUtils.bind(this,function(){if(!g){g=!0;var N=this.graph.getGraphBounds();b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?N.width+2*this.graph.border>b.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){N=b.getBoundingClientRect();var R=mxUtils.getScrollOrigin(document.body);
+R="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-R.x,top:-R.y};N={left:N.left-R.left,top:N.top-R.top,bottom:N.bottom-R.top,right:N.right-R.left};this.toolbar.style.left=N.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=N.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px",this.toolbar.style.top=N.top+1+"px"):this.toolbar.style.top=N.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}}),D=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(N){var R=b.offsetWidth;R==D||this.handlingResize||(this.handlingResize=!0,"auto"==b.style.overflow&&(b.style.overflow="hidden"),this.graph.maxFitScale=null!=N?N: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},D=R,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=
+!1}),0))});GraphViewer.useResizeSensor&&(9>=document.documentMode?(mxEvent.addListener(window,"resize",l),this.graph.addListener("size",l)):new ResizeSensor(this.graph.container,l));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,this.minWidth,this.minHeight),this.graph.resizeContainer=!0;else if(!this.widthIsEmpty||""!=b.style.height&&this.autoFit||this.updateContainerWidth(b,d.width+2*this.graph.border),
+0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,d.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var p=D=null;l=mxUtils.bind(this,function(){window.clearTimeout(p);this.handlingResize||(p=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(9>=document.documentMode?mxEvent.addListener(window,"resize",l):new ResizeSensor(this.graph.container,l))}else 9>=document.documentMode||this.graph.addListener("size",
+l);var E=mxUtils.bind(this,function(N){var R=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==N&&this.allowZoomOut&&(this.allowZoomIn||d.width+2*this.graph.border>b.offsetWidth||d.height+2*this.graph.border>G)?(N=null,null!=G&&d.height+2*this.graph.border>G-2&&(N=(G-2*this.graph.border-2)/d.height),this.fitGraph(N)):this.widthIsEmpty||
+null!=N||0!=this.graphConfig.resize||""==b.style.height?(N=null!=N?N:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-d.x/this.graph.view.scale)+N.x,Math.floor(this.graph.border-d.y/this.graph.view.scale)+N.y),D=b.offsetWidth):this.graph.center((!this.widthIsEmpty||d.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=R});8==document.documentMode?window.setTimeout(E,0):E();this.positionGraph=function(N){d=this.graph.getGraphBounds();D=null;E(N)}};
+GraphViewer.prototype.crop=function(){var b=this.graph,d=b.getGraphBounds(),g=b.border,l=b.view.scale;b.view.setTranslate(null!=d.x?Math.floor(b.view.translate.x-d.x/l+g):g,null!=d.y?Math.floor(b.view.translate.y-d.y/l+g):g)};GraphViewer.prototype.updateContainerWidth=function(b,d){b.style.width=d+"px"};GraphViewer.prototype.updateContainerHeight=function(b,d){if(this.forceCenter||this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||8==document.documentMode)b.style.height=d+"px"};
+GraphViewer.prototype.showLayers=function(b,d){var g=this.graphConfig.layers;g=null!=g&&0<g.length?g.split(" "):[];var l=this.graphConfig.layerIds,D=null!=l&&0<l.length,p=!1;if(0<g.length||D||null!=d){d=null!=d?d.getModel():null;b=b.getModel();b.beginUpdate();try{var E=b.getChildCount(b.root);if(null==d){d=!1;p={};if(D)for(var N=0;N<l.length;N++){var R=b.getCell(l[N]);null!=R&&(d=!0,p[R.id]=!0)}else for(N=0;N<g.length;N++)R=b.getChildAt(b.root,parseInt(g[N])),null!=R&&(d=!0,p[R.id]=!0);for(N=0;d&&
+N<E;N++)R=b.getChildAt(b.root,N),b.setVisible(R,p[R.id]||!1)}else for(N=0;N<E;N++)b.setVisible(b.getChildAt(b.root,N),d.isVisible(d.getChildAt(d.root,N)))}finally{b.endUpdate()}p=!0}return p};
+GraphViewer.prototype.addToolbar=function(){var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var d=b.ownerDocument.createElement("div");d.style.position="absolute";d.style.overflow="hidden";d.style.boxSizing="border-box";d.style.whiteSpace="nowrap";d.style.textAlign="left";d.style.zIndex=this.toolbarZIndex;d.style.backgroundColor="#eee";
+d.style.height=this.toolbarHeight+"px";this.toolbar=d;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(d.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(d,30);var g=null,l=null,D=mxUtils.bind(this,function(ja){null!=g&&(window.clearTimeout(g),fadeThead=null);null!=l&&(window.clearTimeout(l),fadeThead2=null);g=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(d,0);g=null;l=window.setTimeout(mxUtils.bind(this,function(){d.style.display="none";
+l=null}),100)}),ja||200)}),p=mxUtils.bind(this,function(ja){null!=g&&(window.clearTimeout(g),fadeThead=null);null!=l&&(window.clearTimeout(l),fadeThead2=null);d.style.display="";mxUtils.setOpacity(d,ja||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(ja){mxEvent.isTouchEvent(ja)||(p(30),D())}));mxEvent.addListener(d,mxClient.IS_POINTER?"pointermove":"mousemove",function(ja){mxEvent.consume(ja)});mxEvent.addListener(d,"mouseenter",
+mxUtils.bind(this,function(ja){p(100)}));mxEvent.addListener(d,"mousemove",mxUtils.bind(this,function(ja){p(100);mxEvent.consume(ja)}));mxEvent.addListener(d,"mouseleave",mxUtils.bind(this,function(ja){mxEvent.isTouchEvent(ja)||p(30)}));var E=this.graph,N=E.getTolerance();E.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ja,aa){this.startX=aa.getGraphX();this.startY=aa.getGraphY();this.scrollLeft=E.container.scrollLeft;this.scrollTop=E.container.scrollTop},mouseMove:function(ja,
+aa){},mouseUp:function(ja,aa){mxEvent.isTouchEvent(aa.getEvent())&&Math.abs(this.scrollLeft-E.container.scrollLeft)<N&&Math.abs(this.scrollTop-E.container.scrollTop)<N&&Math.abs(this.startX-aa.getGraphX())<N&&Math.abs(this.startY-aa.getGraphY())<N&&(0<parseFloat(d.style.opacity||0)?D():p(30))}})}for(var R=this.toolbarItems,G=0,M=mxUtils.bind(this,function(ja,aa,qa,sa){ja=this.createToolbarButton(ja,aa,qa,sa);d.appendChild(ja);G++;return ja}),Q=null,e=null,f=null,k=null,z=0;z<R.length;z++){var t=R[z];
+if("pages"==t){k=b.ownerDocument.createElement("div");k.style.cssText="display:inline-block;position:relative;top:5px;padding:0 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;;cursor:default;";mxUtils.setOpacity(k,70);var B=M(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");B.style.borderRightStyle="none";B.style.paddingLeft="0px";B.style.paddingRight="0px";d.appendChild(k);var I=M(mxUtils.bind(this,
+function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");I.style.paddingLeft="0px";I.style.paddingRight="0px";t=mxUtils.bind(this,function(){k.innerText="";mxUtils.write(k,this.currentPage+1+" / "+this.diagrams.length);k.style.display=1<this.diagrams.length?"inline-block":"none";B.style.display=k.style.display;I.style.display=k.style.display});this.addListener("graphChanged",t);t()}else if("zoom"==t)this.zoomEnabled&&(M(mxUtils.bind(this,function(){this.graph.zoomOut()}),
+Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),M(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),M(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"==t){if(this.layersEnabled){var O=this.graph.getModel(),J=M(mxUtils.bind(this,function(ja){if(null!=
+Q)Q.parentNode.removeChild(Q),Q=null;else{Q=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var qa=this.graph.getGraphBounds(),sa=this.graph.view;0>qa.x||0>qa.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:sa.translate.clone(),scale:sa.scale}):null!=this.graph.originalViewState&&0<qa.x/sa.scale+this.graph.originalViewState.translate.x-sa.translate.x&&0<qa.y/sa.scale+this.graph.originalViewState.translate.y-
+sa.translate.y&&(sa.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:sa.translate.clone(),scale:sa.scale})}}));mxEvent.addListener(Q,"mouseleave",function(){Q.parentNode.removeChild(Q);Q=null});ja=J.getBoundingClientRect();Q.style.width="140px";Q.style.padding="2px 0px 2px 0px";Q.style.border="1px solid #d0d0d0";Q.style.backgroundColor="#eee";Q.style.fontFamily=Editor.defaultHtmlFont;
+Q.style.fontSize="11px";Q.style.overflowY="auto";Q.style.maxHeight=this.graph.container.clientHeight-this.toolbarHeight-10+"px";Q.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(Q,80);var aa=mxUtils.getDocumentScrollOrigin(document);Q.style.left=aa.x+ja.left-1+"px";Q.style.top=aa.y+ja.bottom-2+"px";document.body.appendChild(Q)}}),Editor.layersImage,mxResources.get("layers")||"Layers");O.addListener(mxEvent.CHANGE,function(){J.style.display=1<O.getChildCount(O.root)?"inline-block":"none"});J.style.display=
+1<O.getChildCount(O.root)?"inline-block":"none"}}else if("tags"==t){if(this.tagsEnabled){var y=M(mxUtils.bind(this,function(ja){null==e&&(e=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),e.div.getElementsByTagName("div")[0].style.position="",e.div.style.maxHeight="160px",e.div.style.maxWidth="120px",e.div.style.padding="2px",e.div.style.overflow="auto",e.div.style.height="auto",e.div.style.position="fixed",e.div.style.fontFamily=Editor.defaultHtmlFont,e.div.style.fontSize="11px",
+e.div.style.backgroundColor="#eee",e.div.style.color="#000",e.div.style.border="1px solid #d0d0d0",e.div.style.zIndex=this.toolbarZIndex+1,mxUtils.setOpacity(e.div,80));if(null!=f)f.parentNode.removeChild(f),f=null;else{f=e.div;mxEvent.addListener(f,"mouseleave",function(){f.parentNode.removeChild(f);f=null});ja=y.getBoundingClientRect();var aa=mxUtils.getDocumentScrollOrigin(document);f.style.left=aa.x+ja.left-1+"px";f.style.top=aa.y+ja.bottom-2+"px";document.body.appendChild(f);e.refresh()}}),Editor.tagsImage,
+mxResources.get("tags")||"Tags");O.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){y.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}));y.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}}else"lightbox"==t?this.lightboxEnabled&&M(mxUtils.bind(this,function(){this.showLightbox()}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(t=this.graphConfig["toolbar-buttons"][t],null!=t&&(t.elem=M(null==
+t.enabled||t.enabled?t.handler:function(){},t.image,t.title,t.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*G);null!=this.graphConfig.title&&(R=b.ownerDocument.createElement("div"),R.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",R.setAttribute("title",this.graphConfig.title),mxUtils.write(R,this.graphConfig.title),mxUtils.setOpacity(R,70),
+d.appendChild(R),this.filename=R);this.minToolbarWidth=34*G;var ia=b.style.border,da=mxUtils.bind(this,function(){d.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";d.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var ja=b.getBoundingClientRect(),aa=mxUtils.getScrollOrigin(document.body);aa="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-aa.x,top:-aa.y};ja={left:ja.left-
+aa.left,top:ja.top-aa.top,bottom:ja.bottom-aa.top,right:ja.right-aa.left};d.style.left=ja.left+"px";"bottom"==this.graphConfig["toolbar-position"]?d.style.top=ja.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(d.style.marginTop=-this.toolbarHeight+"px",d.style.top=ja.top+1+"px"):d.style.top=ja.top+"px";"1px solid transparent"==ia&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(d);var qa=mxUtils.bind(this,function(){null!=d.parentNode&&d.parentNode.removeChild(d);null!=
+Q&&(Q.parentNode.removeChild(Q),Q=null);b.style.border=ia});mxEvent.addListener(document,"mousemove",function(sa){for(sa=mxEvent.getSource(sa);null!=sa;){if(sa==b||sa==d||sa==Q)return;sa=sa.parentNode}qa()});mxEvent.addListener(document.body,"mouseleave",function(sa){qa()})}else d.style.top=-this.toolbarHeight+"px",b.appendChild(d)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",da):da();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=
+d.parentNode&&da()})).observe(b)};
+GraphViewer.prototype.createToolbarButton=function(b,d,g,l){var D=document.createElement("div");D.style.borderRight="1px solid #d0d0d0";D.style.padding="3px 6px 3px 6px";mxEvent.addListener(D,"click",b);null!=g&&D.setAttribute("title",g);D.style.display="inline-block";b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",d);b.style.width="18px";null==l||l?(mxEvent.addListener(D,"mouseenter",function(){D.style.backgroundColor="#ddd"}),mxEvent.addListener(D,"mouseleave",
+function(){D.style.backgroundColor="#eee"}),mxUtils.setOpacity(b,60),D.style.cursor="pointer"):mxUtils.setOpacity(D,30);D.appendChild(b);return D};GraphViewer.prototype.disableButton=function(b){var d=this.graphConfig["toolbar-buttons"]?this.graphConfig["toolbar-buttons"][b]:null;null!=d&&(mxUtils.setOpacity(d.elem,30),mxEvent.removeListener(d.elem,"click",d.handler),mxEvent.addListener(d.elem,"mouseenter",function(){d.elem.style.backgroundColor="#eee"}))};
+GraphViewer.prototype.addClickHandler=function(b,d){b.linkPolicy=this.graphConfig.target||b.linkPolicy;b.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(g,l){if(null==l)for(var D=mxEvent.getSource(g);D!=b.container&&null!=D&&null==l;)"a"==D.nodeName.toLowerCase()&&(l=D.getAttribute("href")),D=D.parentNode;null!=d?null==l||b.isCustomLink(l)?mxEvent.consume(g):b.isExternalProtocol(l)||b.isBlankLink(l)||window.setTimeout(function(){d.destroy()},0):null!=l&&null==d&&b.isCustomLink(l)&&
+(mxEvent.isTouchEvent(g)||!mxEvent.isPopupTrigger(g))&&b.customLinkClicked(l)&&(mxUtils.clearSelection(),mxEvent.consume(g))}),mxUtils.bind(this,function(g){null!=d||!this.lightboxClickEnabled||mxEvent.isTouchEvent(g)&&0!=this.toolbarItems.length||this.showLightbox()}))};
+GraphViewer.prototype.showLightbox=function(b,d,g){if("open"==this.graphConfig.lightbox||window.self!==window.top)if(null==this.lightboxWindow||this.lightboxWindow.closed){b=null!=b?b:null!=this.graphConfig.editable?this.graphConfig.editable:!0;g={client:1,target:null!=g?g:"blank"};b&&(g.edit=this.graphConfig.edit||"_blank");if(null!=d?d:1)g.close=1;this.layersEnabled&&(g.layers=1);this.tagsEnabled&&(g.tags={});null!=this.graphConfig&&0!=this.graphConfig.nav&&(g.nav=1);null!=this.graphConfig&&null!=
+this.graphConfig.highlight&&(g.highlight=this.graphConfig.highlight.substring(1));null!=this.currentPage&&0<this.currentPage&&(g.page=this.currentPage);"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)?null==this.lightboxWindow&&mxEvent.addListener(window,"message",mxUtils.bind(this,function(l){"ready"==l.data&&l.source==this.lightboxWindow&&this.lightboxWindow.postMessage(this.xml,"*")})):g.data=encodeURIComponent(this.xml);"1"==urlParams.dev&&(g.dev=
+"1");this.lightboxWindow=window.open(("1"!=urlParams.dev?EditorUi.lightboxHost:"https://test.draw.io")+"/#P"+encodeURIComponent(JSON.stringify(g)))}else this.lightboxWindow.focus();else this.showLocalLightbox()};
+GraphViewer.prototype.showLocalLightbox=function(){mxUtils.getDocumentScrollOrigin(document);var b=document.createElement("div");b.style.cssText="position:fixed;top:0;left:0;bottom:0;right:0;";b.style.zIndex=this.lightboxZIndex;b.style.backgroundColor="#000000";mxUtils.setOpacity(b,70);document.body.appendChild(b);var d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("src",Editor.closeBlackImage);d.style.cssText="position:fixed;top:32px;right:32px;";d.style.cursor="pointer";
+mxEvent.addListener(d,"click",function(){l.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;urlParams["page-id"]=this.graphConfig.pageId;urlParams["layer-ids"]=null!=this.graphConfig.layerIds&&0<this.graphConfig.layerIds.length?this.graphConfig.layerIds.join(" "):null;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=this.layersEnabled?"1":"0";this.tagsEnabled&&(urlParams.tags="{}");if(null==document.documentMode||10<=document.documentMode)Editor.prototype.editButtonLink=
+this.graphConfig.edit,Editor.prototype.editButtonFunc=this.graphConfig.editFunc;EditorUi.prototype.updateActionStates=function(){};EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};var g=Graph.prototype.shadowId;Graph.prototype.shadowId="lightboxDropShadow";var l=new EditorUi(new Editor(!0),document.createElement("div"),!0);l.editor.editBlankUrl=this.editBlankUrl;l.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=g;
+l.refresh=function(){};var D=mxUtils.bind(this,function(Q){27==Q.keyCode&&l.destroy()}),p=this.initialOverflow,E=l.destroy;l.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",D);document.body.removeChild(b);document.body.removeChild(d);document.body.style.overflow=p;GraphViewer.resizeSensorEnabled=!0;E.apply(this,arguments)};var N=l.editor.graph,R=N.container;R.style.overflow="hidden";this.lightboxChrome?(R.style.border="1px solid #c0c0c0",R.style.margin="40px",mxEvent.addListener(document.documentElement,
+"keydown",D)):(b.style.display="none",d.style.display="none");var G=this;N.getImageFromBundles=function(Q){return G.getImageUrl(Q)};var M=l.createTemporaryGraph;l.createTemporaryGraph=function(){var Q=M.apply(this,arguments);Q.getImageFromBundles=function(e){return G.getImageUrl(e)};return Q};this.graphConfig.move&&(N.isMoveCellsEvent=function(Q){return!0});mxUtils.setPrefixedStyle(R.style,"border-radius","4px");R.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow=
+"hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(R.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(R.style,"transition","all .25s ease-in-out"));this.addClickHandler(N,l);window.setTimeout(mxUtils.bind(this,function(){R.style.outline="none";R.style.zIndex=this.lightboxZIndex;d.style.zIndex=this.lightboxZIndex;document.body.appendChild(R);document.body.appendChild(d);l.setFileData(this.xml);mxUtils.setPrefixedStyle(R.style,"transform","rotateY(0deg)");l.chromelessToolbar.style.bottom=
+"60px";l.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(l.chromelessToolbar);l.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});l.lightboxFit();l.chromelessResize();this.showLayers(N,this.graph);mxEvent.addListener(b,"click",function(){l.destroy()})}),0);return l};
GraphViewer.prototype.updateTitle=function(b){b=b||"";this.showTitleAsTooltip&&null!=this.graph&&null!=this.graph.container&&this.graph.container.setAttribute("title",b);null!=this.filename&&(this.filename.innerText="",mxUtils.write(this.filename,b),this.filename.setAttribute("title",b))};
-GraphViewer.processElements=function(b){mxUtils.forEach(GraphViewer.getElementsByClassName(b||"mxgraph"),function(e){try{e.innerText="",GraphViewer.createViewerForElement(e)}catch(k){e.innerText=k.message,null!=window.console&&console.error(k)}})};
-GraphViewer.getElementsByClassName=function(b){if(document.getElementsByClassName){var e=document.getElementsByClassName(b);b=[];for(var k=0;k<e.length;k++)b.push(e[k]);return b}var m=document.getElementsByTagName("*");e=[];for(k=0;k<m.length;k++){var C=m[k].className;null!=C&&0<C.length&&(C=C.split(" "),0<=mxUtils.indexOf(C,b)&&e.push(m[k]))}return e};
-GraphViewer.createViewerForElement=function(b,e){var k=b.getAttribute("data-mxgraph");if(null!=k){var m=JSON.parse(k),C=function(p){p=mxUtils.parseXml(p);p=new GraphViewer(b,p.documentElement,m);null!=e&&e(p)};null!=m.url?GraphViewer.getUrl(m.url,function(p){C(p)}):C(m.xml)}};
-GraphViewer.initCss=function(){try{var b=document.createElement("style");b.type="text/css";b.innerHTML="div.mxTooltip {\n-webkit-box-shadow: 3px 3px 12px #C0C0C0;\n-moz-box-shadow: 3px 3px 12px #C0C0C0;\nbox-shadow: 3px 3px 12px #C0C0C0;\nbackground: #FFFFCC;\nborder-style: solid;\nborder-width: 1px;\nborder-color: black;\nfont-family: Arial;\nfont-size: 8pt;\nposition: absolute;\ncursor: default;\npadding: 4px;\ncolor: black;}\ntd.mxPopupMenuIcon div {\nwidth:16px;\nheight:16px;}\nhtml div.mxPopupMenu {\n-webkit-box-shadow:2px 2px 3px #d5d5d5;\n-moz-box-shadow:2px 2px 3px #d5d5d5;\nbox-shadow:2px 2px 3px #d5d5d5;\n_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d0d0d0',Positive='true');\nbackground:white;\nposition:absolute;\nborder:3px solid #e7e7e7;\npadding:3px;}\nhtml table.mxPopupMenu {\nborder-collapse:collapse;\nmargin:0px;}\nhtml td.mxPopupMenuItem {\npadding:7px 30px 7px 30px;\nfont-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;}\nhtml td.mxPopupMenuIcon {\nbackground-color:white;\npadding:0px;}\ntd.mxPopupMenuIcon .geIcon {\npadding:2px;\npadding-bottom:4px;\nmargin:2px;\nborder:1px solid transparent;\nopacity:0.5;\n_width:26px;\n_height:26px;}\ntd.mxPopupMenuIcon .geIcon:hover {\nborder:1px solid gray;\nborder-radius:2px;\nopacity:1;}\nhtml tr.mxPopupMenuItemHover {\nbackground-color: #eeeeee;\ncolor: black;}\ntable.mxPopupMenu hr {\ncolor:#cccccc;\nbackground-color:#cccccc;\nborder:none;\nheight:1px;}\ntable.mxPopupMenu tr {\tfont-size:4pt;}\n.geDialog, .geDialog table { font-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;\nborder:none;\nmargin:0px;}\n.geDialog {\tposition:absolute;\tbackground:white;\toverflow:hidden;\tpadding:30px;\tborder:1px solid #acacac;\t-webkit-box-shadow:0px 0px 2px 2px #d5d5d5;\t-moz-box-shadow:0px 0px 2px 2px #d5d5d5;\tbox-shadow:0px 0px 2px 2px #d5d5d5;\t_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d5d5d5', Positive='true');\tz-index: 2;}.geDialogClose {\tposition:absolute;\twidth:9px;\theight:9px;\topacity:0.5;\tcursor:pointer;\t_filter:alpha(opacity=50);}.geDialogClose:hover {\topacity:1;}.geDialogTitle {\tbox-sizing:border-box;\twhite-space:nowrap;\tbackground:rgb(229, 229, 229);\tborder-bottom:1px solid rgb(192, 192, 192);\tfont-size:15px;\tfont-weight:bold;\ttext-align:center;\tcolor:rgb(35, 86, 149);}.geDialogFooter {\tbackground:whiteSmoke;\twhite-space:nowrap;\ttext-align:right;\tbox-sizing:border-box;\tborder-top:1px solid #e5e5e5;\tcolor:darkGray;}\n.geBtn {\tbackground-color: #f5f5f5;\tborder-radius: 2px;\tborder: 1px solid #d8d8d8;\tcolor: #333;\tcursor: default;\tfont-size: 11px;\tfont-weight: bold;\theight: 29px;\tline-height: 27px;\tmargin: 0 0 0 8px;\tmin-width: 72px;\toutline: 0;\tpadding: 0 8px;\tcursor: pointer;}.geBtn:hover, .geBtn:focus {\t-webkit-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\t-moz-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tbox-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tborder: 1px solid #c6c6c6;\tbackground-color: #f8f8f8;\tbackground-image: linear-gradient(#f8f8f8 0px,#f1f1f1 100%);\tcolor: #111;}.geBtn:disabled {\topacity: .5;}.gePrimaryBtn {\tbackground-color: #4d90fe;\tbackground-image: linear-gradient(#4d90fe 0px,#4787ed 100%);\tborder: 1px solid #3079ed;\tcolor: #fff;}.gePrimaryBtn:hover, .gePrimaryBtn:focus {\tbackground-color: #357ae8;\tbackground-image: linear-gradient(#4d90fe 0px,#357ae8 100%);\tborder: 1px solid #2f5bb7;\tcolor: #fff;}.gePrimaryBtn:disabled {\topacity: .5;}";document.getElementsByTagName("head")[0].appendChild(b)}catch(e){}};
-GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,e,k){if(null!=GraphViewer.cachedUrls[b])e(GraphViewer.cachedUrls[b]);else{var 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=k;m.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
-(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(k){return window.setTimeout(k,20)},e=function(k,m){function C(){this.q=[];this.add=function(y){this.q.push(y)};var g,x;this.call=function(){g=0;for(x=this.q.length;g<x;g++)this.q[g].call()}}function p(g,x){return g.currentStyle?g.currentStyle[x]:window.getComputedStyle?window.getComputedStyle(g,null).getPropertyValue(x):g.style[x]}function F(g,x){if(!g.resizedAttached)g.resizedAttached=
-new C,g.resizedAttached.add(x);else if(g.resizedAttached){g.resizedAttached.add(x);return}g.resizeSensor=document.createElement("div");g.resizeSensor.className="resize-sensor";g.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";g.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>';
-g.appendChild(g.resizeSensor);"static"==p(g,"position")&&(g.style.position="relative");var y=g.resizeSensor.childNodes[0],t=y.childNodes[0],G=g.resizeSensor.childNodes[1],D=function(){t.style.width="100000px";t.style.height="100000px";y.scrollLeft=1E5;y.scrollTop=1E5;G.scrollLeft=1E5;G.scrollTop=1E5};D();var I=!1,H=function(){g.resizedAttached&&(I&&(g.resizedAttached.call(),I=!1),b(H))};b(H);var S,T,M,fa;x=function(){if((M=g.offsetWidth)!=S||(fa=g.offsetHeight)!=T)I=!0,S=M,T=fa;D()};var la=function(ra,
-ba,oa){ra.attachEvent?ra.attachEvent("on"+ba,oa):ra.addEventListener(ba,oa)};la(y,"scroll",x);la(G,"scroll",x)}var L=function(){GraphViewer.resizeSensorEnabled&&m()},P=Object.prototype.toString.call(k),d="[object Array]"===P||"[object NodeList]"===P||"[object HTMLCollection]"===P||"undefined"!==typeof jQuery&&k instanceof jQuery||"undefined"!==typeof Elements&&k instanceof Elements;if(d){P=0;for(var f=k.length;P<f;P++)F(k[P],L)}else F(k,L);this.detach=function(){if(d)for(var g=0,x=k.length;g<x;g++)e.detach(k[g]);
-else e.detach(k)}};e.detach=function(k){k.resizeSensor&&(k.removeChild(k.resizeSensor),delete k.resizeSensor,delete k.resizedAttached)};window.ResizeSensor=e})();
+GraphViewer.processElements=function(b){mxUtils.forEach(GraphViewer.getElementsByClassName(b||"mxgraph"),function(d){try{d.innerText="",GraphViewer.createViewerForElement(d)}catch(g){d.innerText=g.message,null!=window.console&&console.error(g)}})};
+GraphViewer.getElementsByClassName=function(b){if(document.getElementsByClassName){var d=document.getElementsByClassName(b);b=[];for(var g=0;g<d.length;g++)b.push(d[g]);return b}var l=document.getElementsByTagName("*");d=[];for(g=0;g<l.length;g++){var D=l[g].className;null!=D&&0<D.length&&(D=D.split(" "),0<=mxUtils.indexOf(D,b)&&d.push(l[g]))}return d};
+GraphViewer.createViewerForElement=function(b,d){var g=b.getAttribute("data-mxgraph");if(null!=g){var l=JSON.parse(g),D=function(p){p=mxUtils.parseXml(p);p=new GraphViewer(b,p.documentElement,l);null!=d&&d(p)};null!=l.url?GraphViewer.getUrl(l.url,function(p){D(p)}):D(l.xml)}};
+GraphViewer.initCss=function(){try{var b=document.createElement("style");b.type="text/css";b.innerHTML="div.mxTooltip {\n-webkit-box-shadow: 3px 3px 12px #C0C0C0;\n-moz-box-shadow: 3px 3px 12px #C0C0C0;\nbox-shadow: 3px 3px 12px #C0C0C0;\nbackground: #FFFFCC;\nborder-style: solid;\nborder-width: 1px;\nborder-color: black;\nfont-family: Arial;\nfont-size: 8pt;\nposition: absolute;\ncursor: default;\npadding: 4px;\ncolor: black;}\ntd.mxPopupMenuIcon div {\nwidth:16px;\nheight:16px;}\nhtml div.mxPopupMenu {\n-webkit-box-shadow:2px 2px 3px #d5d5d5;\n-moz-box-shadow:2px 2px 3px #d5d5d5;\nbox-shadow:2px 2px 3px #d5d5d5;\n_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d0d0d0',Positive='true');\nbackground:white;\nposition:absolute;\nborder:3px solid #e7e7e7;\npadding:3px;}\nhtml table.mxPopupMenu {\nborder-collapse:collapse;\nmargin:0px;}\nhtml td.mxPopupMenuItem {\npadding:7px 30px 7px 30px;\nfont-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;}\nhtml td.mxPopupMenuIcon {\nbackground-color:white;\npadding:0px;}\ntd.mxPopupMenuIcon .geIcon {\npadding:2px;\npadding-bottom:4px;\nmargin:2px;\nborder:1px solid transparent;\nopacity:0.5;\n_width:26px;\n_height:26px;}\ntd.mxPopupMenuIcon .geIcon:hover {\nborder:1px solid gray;\nborder-radius:2px;\nopacity:1;}\nhtml tr.mxPopupMenuItemHover {\nbackground-color: #eeeeee;\ncolor: black;}\ntable.mxPopupMenu hr {\ncolor:#cccccc;\nbackground-color:#cccccc;\nborder:none;\nheight:1px;}\ntable.mxPopupMenu tr {\tfont-size:4pt;}\n.geDialog, .geDialog table { font-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;\nborder:none;\nmargin:0px;}\n.geDialog {\tposition:absolute;\tbackground:white;\toverflow:hidden;\tpadding:30px;\tborder:1px solid #acacac;\t-webkit-box-shadow:0px 0px 2px 2px #d5d5d5;\t-moz-box-shadow:0px 0px 2px 2px #d5d5d5;\tbox-shadow:0px 0px 2px 2px #d5d5d5;\t_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d5d5d5', Positive='true');\tz-index: 2;}.geDialogClose {\tposition:absolute;\twidth:9px;\theight:9px;\topacity:0.5;\tcursor:pointer;\t_filter:alpha(opacity=50);}.geDialogClose:hover {\topacity:1;}.geDialogTitle {\tbox-sizing:border-box;\twhite-space:nowrap;\tbackground:rgb(229, 229, 229);\tborder-bottom:1px solid rgb(192, 192, 192);\tfont-size:15px;\tfont-weight:bold;\ttext-align:center;\tcolor:rgb(35, 86, 149);}.geDialogFooter {\tbackground:whiteSmoke;\twhite-space:nowrap;\ttext-align:right;\tbox-sizing:border-box;\tborder-top:1px solid #e5e5e5;\tcolor:darkGray;}\n.geBtn {\tbackground-color: #f5f5f5;\tborder-radius: 2px;\tborder: 1px solid #d8d8d8;\tcolor: #333;\tcursor: default;\tfont-size: 11px;\tfont-weight: bold;\theight: 29px;\tline-height: 27px;\tmargin: 0 0 0 8px;\tmin-width: 72px;\toutline: 0;\tpadding: 0 8px;\tcursor: pointer;}.geBtn:hover, .geBtn:focus {\t-webkit-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\t-moz-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tbox-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tborder: 1px solid #c6c6c6;\tbackground-color: #f8f8f8;\tbackground-image: linear-gradient(#f8f8f8 0px,#f1f1f1 100%);\tcolor: #111;}.geBtn:disabled {\topacity: .5;}.gePrimaryBtn {\tbackground-color: #4d90fe;\tbackground-image: linear-gradient(#4d90fe 0px,#4787ed 100%);\tborder: 1px solid #3079ed;\tcolor: #fff;}.gePrimaryBtn:hover, .gePrimaryBtn:focus {\tbackground-color: #357ae8;\tbackground-image: linear-gradient(#4d90fe 0px,#357ae8 100%);\tborder: 1px solid #2f5bb7;\tcolor: #fff;}.gePrimaryBtn:disabled {\topacity: .5;}";document.getElementsByTagName("head")[0].appendChild(b)}catch(d){}};
+GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,d,g){if(null!=GraphViewer.cachedUrls[b])d(GraphViewer.cachedUrls[b]);else{var l=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;l.open("GET",b);l.onload=function(){d(null!=l.getText?l.getText():l.responseText)};l.onerror=g;l.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
+(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(g){return window.setTimeout(g,20)},d=function(g,l){function D(){this.q=[];this.add=function(f){this.q.push(f)};var Q,e;this.call=function(){Q=0;for(e=this.q.length;Q<e;Q++)this.q[Q].call()}}function p(Q,e){return Q.currentStyle?Q.currentStyle[e]:window.getComputedStyle?window.getComputedStyle(Q,null).getPropertyValue(e):Q.style[e]}function E(Q,e){if(!Q.resizedAttached)Q.resizedAttached=
+new D,Q.resizedAttached.add(e);else if(Q.resizedAttached){Q.resizedAttached.add(e);return}Q.resizeSensor=document.createElement("div");Q.resizeSensor.className="resize-sensor";Q.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";Q.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>';
+Q.appendChild(Q.resizeSensor);"static"==p(Q,"position")&&(Q.style.position="relative");var f=Q.resizeSensor.childNodes[0],k=f.childNodes[0],z=Q.resizeSensor.childNodes[1],t=function(){k.style.width="100000px";k.style.height="100000px";f.scrollLeft=1E5;f.scrollTop=1E5;z.scrollLeft=1E5;z.scrollTop=1E5};t();var B=!1,I=function(){Q.resizedAttached&&(B&&(Q.resizedAttached.call(),B=!1),b(I))};b(I);var O,J,y,ia;e=function(){if((y=Q.offsetWidth)!=O||(ia=Q.offsetHeight)!=J)B=!0,O=y,J=ia;t()};var da=function(ja,
+aa,qa){ja.attachEvent?ja.attachEvent("on"+aa,qa):ja.addEventListener(aa,qa)};da(f,"scroll",e);da(z,"scroll",e)}var N=function(){GraphViewer.resizeSensorEnabled&&l()},R=Object.prototype.toString.call(g),G="[object Array]"===R||"[object NodeList]"===R||"[object HTMLCollection]"===R||"undefined"!==typeof jQuery&&g instanceof jQuery||"undefined"!==typeof Elements&&g instanceof Elements;if(G){R=0;for(var M=g.length;R<M;R++)E(g[R],N)}else E(g,N);this.detach=function(){if(G)for(var Q=0,e=g.length;Q<e;Q++)d.detach(g[Q]);
+else d.detach(g)}};d.detach=function(g){g.resizeSensor&&(g.removeChild(g.resizeSensor),delete g.resizeSensor,delete g.resizedAttached)};window.ResizeSensor=d})();
(function(){Editor.initMath();GraphViewer.initCss();if(null!=window.onDrawioViewerLoad)window.onDrawioViewerLoad();else GraphViewer.processElements()})();